summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--tag-emacs/emacs.d/init.org24
1 files changed, 20 insertions, 4 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org
index 023de0ac..1498f250 100644
--- a/tag-emacs/emacs.d/init.org
+++ b/tag-emacs/emacs.d/init.org
@@ -614,12 +614,28 @@ with spaces.  Perfect!
 
 #+BEGIN_SRC emacs-lisp
   (req-package smart-tabs-mode
-    :commands (smart-tabs-mode
-               smart-tabs-mode-enable
-               smart-tabs-advice)
+    :defer 1
     :config (progn
-              (smart-tabs-insinuate 'c 'javascript 'cperl 'python))
+              (smart-tabs-mode/no-tabs-mode-advice align)
+              (smart-tabs-mode/no-tabs-mode-advice align-regexp)
+              (smart-tabs-mode/no-tabs-mode-advice indent-relative)
+              (smart-tabs-mode/no-tabs-mode-advice comment-dwim)
+              (smart-tabs-mode/no-tabs-mode-advice comment-box)
+              (smart-tabs-mode/no-tabs-mode-advice comment-indent)
+
+              (unless
+                  (ad-find-advice 'indent-according-to-mode 'around 'smart-tabs)
+                (defadvice indent-according-to-mode (around smart-tabs activate)
+                  (if smart-tabs-mode
+                      (let ((indent-tabs-mode indent-tabs-mode))
+                        (if (memq indent-line-function
+                                  '(indent-relative
+                                    indent-relative-maybe))
+                            (setq indent-tabs-mode nil))
+                        ad-do-it)
+                    ad-do-it))))
     :init (progn
+            (smart-tabs-insinuate 'c 'cperl 'javascript 'python)
             (add-hook 'php-mode-hook (lambda ()
                                        (smart-tabs-mode indent-tabs-mode)))))
 #+END_SRC