                 indent-relative-maybe))
         (setq indent-tabs-mode indent-tabs-mode))
     ad-do-it))
+
 
 (defmacro smart-tabs-advice (function offset)
   `(progn

(defadvice align (around smart-tabs activate)
  (let ((indent-tabs-mode indent-tabs-mode)) ad-do-it))

(defadvice align-regexp (around smart-tabs activate)
  (let ((indent-tabs-mode indent-tabs-mode)) ad-do-it))

(defadvice indent-relative (around smart-tabs activate)
  (let ((indent-tabs-mode indent-tabs-mode)) ad-do-it))

(defadvice indent-according-to-mode (around smart-tabs activate)
  (let ((indent-tabs-mode indent-tabs-mode))

        (t
         ad-do-it)))))


(use-package "smart-tab"
  ;; :load-path "site-lisp/smart-tab"
  :config
  (global-smart-tab-mode t)
  (global-set-key [(tab)] 'smart-tab)

  ;; Standard Emacs autocomplete with dabbrev:
  ;; Alternatively use hippie-expand with (M-x hip RET):
  ;; https://www.emacswiki.org/emacs/TabCompletion#SmartTab
  ;; (global-set-key [(backtab)] 'dabbrev-expand)
  (global-set-key [(backtab)] 'hippie-expand)

  (setq smart-tab-debug nil)

  ;; C like languages
  ;;
  (make-local-variable 'tab-width)
  (setq tab-width (or (default-value 'tab-width) 4))
  (setq cua-auto-tabify-rectangles nil)
