summaryrefslogtreecommitdiff
path: root/.config/emacs
diff options
context:
space:
mode:
authorLuke Shumaker <lukeshu@sbcglobal.net>2015-01-01 16:35:55 -0500
committerLuke Shumaker <lukeshu@sbcglobal.net>2015-01-01 16:35:55 -0500
commit1d696096996928bcc29c0c710797413c58ca5d8e (patch)
treea9b2ce83c165df8f48d1a372d912041022ae2b4d /.config/emacs
parent1bf3ec9c7bd181eb279aad981de2d1376c7298c9 (diff)
emacs: switch to the new advice system
Diffstat (limited to '.config/emacs')
-rw-r--r--.config/emacs/init.el7
1 files changed, 5 insertions, 2 deletions
diff --git a/.config/emacs/init.el b/.config/emacs/init.el
index d879d5d..e25961e 100644
--- a/.config/emacs/init.el
+++ b/.config/emacs/init.el
@@ -129,8 +129,11 @@
(when (fboundp 'tool-bar-mode) (tool-bar-mode -1))
-(defadvice align-regexp (around lukeshu-align-with-spaces)
- (let ((indent-tabs-mode nil)) ad-do-it))
+(defun align-regexp--use-spaces (orig-fun &rest args)
+ "Use spaces for alignment"
+ (let ((indent-tabs-mode nil))
+ (apply orig-fun args)))
+(advice-add 'align-regexp :around #'align-regexp--use-spaces)
(require 'go-mode-load nil t)