summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-12-09 12:24:37 +0100
committerDavid Robillard <d@drobilla.net>2017-12-09 12:24:37 +0100
commit1d5fb276361f5d98b0469b15b50af02ad99f249c (patch)
tree3d104723cfcbd571e259119f4aad30cbe2abf483
parent492fb4ca9e6a9817f5aec701ec804da15a81bd7f (diff)
downloaddotfiles-1d5fb276361f5d98b0469b15b50af02ad99f249c.tar.gz
dotfiles-1d5fb276361f5d98b0469b15b50af02ad99f249c.tar.bz2
dotfiles-1d5fb276361f5d98b0469b15b50af02ad99f249c.zip
Remove old smarttabs package
-rw-r--r--emacs.d/init.el2
-rw-r--r--emacs.d/site-lisp/smarttabs.el57
2 files changed, 2 insertions, 57 deletions
diff --git a/emacs.d/init.el b/emacs.d/init.el
index 95a9ffa..9691ca1 100644
--- a/emacs.d/init.el
+++ b/emacs.d/init.el
@@ -361,10 +361,12 @@
(auto-fill-mode 1)
(abbrev-mode -1)
(set-fill-column 79)
+ (smart-tabs-mode-enable)
(setq tab-width 4)
(setq indent-tabs-mode t)
(setq truncate-lines t)
(setq show-trailing-whitespace t)
+ (smart-tabs-advice c-indent-line c-basic-offset)
(c-set-style "drobilla"))
(add-hook 'c-mode-common-hook 'my-c-mode-common-hook)
diff --git a/emacs.d/site-lisp/smarttabs.el b/emacs.d/site-lisp/smarttabs.el
deleted file mode 100644
index ee64815..0000000
--- a/emacs.d/site-lisp/smarttabs.el
+++ /dev/null
@@ -1,57 +0,0 @@
-;;
-;; Emacs smart tabs functionality
-;; Intelligently indent with tabs, align with spaces!
-;;
-;; Note: Indenting only uses tabs when indent-tabs-mode is non-nil,
-;; otherwise it uses spaces as usual.
-;;
-;; To use: save as smarttabs.el in your .emacs.d directory, and add
-;; "(require 'smarttabs)" to your .emacs file.
-;;
-;; Code is GPLv2, derived from http://www.emacswiki.org/emacs/SmartTabs
-;;
-;; Modifications by John Croisant:
-;; * Remembers and re-applies window start, so that indenting doesn't
-;; cause the window to visibly scroll. (2009-09-18)
-;;
-
-
-(defadvice align (around smart-tabs activate)
- (let ((indent-tabs-mode nil)) ad-do-it))
-
-(defadvice align-regexp (around smart-tabs activate)
- (let ((indent-tabs-mode nil)) ad-do-it))
-
-(defadvice indent-relative (around smart-tabs activate)
- (let ((indent-tabs-mode nil)) ad-do-it))
-
-(defadvice indent-according-to-mode (around smart-tabs activate)
- (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))
-
-(defmacro smart-tabs-advice (function offset)
- `(defadvice ,function (around smart-tabs activate)
- (cond
- (indent-tabs-mode
- (save-excursion
- (beginning-of-line)
- (while (looking-at "\t*\\( +\\)\t+")
- (replace-match "" nil nil nil 1)))
- (setq tab-width tab-width)
- (let ((tab-width fill-column)
- (,offset fill-column)
- (wstart (window-start)))
- ad-do-it
- (set-window-start (selected-window) wstart)))
- (t
- ad-do-it))))
-
-(smart-tabs-advice c-indent-line c-basic-offset)
-(smart-tabs-advice c-indent-region c-basic-offset)
-
-
-(provide 'smarttabs)