diff options
author | Alan Pearce | 2015-08-31 10:17:47 +0200 |
---|---|---|
committer | Alan Pearce | 2015-08-31 10:17:47 +0200 |
commit | 4d21cdf99136d0280cb2af57613295255f20a910 (patch) | |
tree | b610377354af6612df051fa77824dc75afdc22f2 /tag-emacs | |
parent | 978b10831437e0217d2c770ac88272ba1a1c4dc4 (diff) | |
download | dotfiles-4d21cdf99136d0280cb2af57613295255f20a910.tar.lz dotfiles-4d21cdf99136d0280cb2af57613295255f20a910.tar.zst dotfiles-4d21cdf99136d0280cb2af57613295255f20a910.zip |
Emacs: Fix smart-tabs-mode by brute force
Not really sure what’s wrong with the initialisation, but now it works.
Diffstat (limited to 'tag-emacs')
-rw-r--r-- | tag-emacs/emacs.d/init.org | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/tag-emacs/emacs.d/init.org b/tag-emacs/emacs.d/init.org index 023de0a..1498f25 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 |