Emacs: refactor rename-modeline
Alan Pearce alan@alanpearce.co.uk
Mon, 14 Jul 2014 20:45:39 +0100
1 files changed, 4 insertions(+), 5 deletions(-)
jump to
M tag-emacs/emacs.d/init.el → tag-emacs/emacs.d/init.el
@@ -12,10 +12,9 @@ (load custom-file :noerror) ;;;; Helper Macros -(defmacro rename-modeline (package-name mode new-name) - `(eval-after-load ,package-name - '(defadvice ,mode (after rename-modeline activate) - (setq mode-name ,new-name)))) +(defmacro rename-modeline (mode new-name) + `(defadvice ,mode (after rename-modeline activate) + (setq mode-name ,new-name))) ;;; Allow lisps to use a common setup. I don't know why they don't have some lispy mode as their parent, but this is close enough (defcustom lisp-common-mode-hook nil @@ -973,7 +972,7 @@ (defun set-common-lisp-indentation () (set (make-local-variable 'lisp-indent-function) #'common-lisp-indent-function)) -(rename-modeline "lisp-mode" emacs-lisp-mode "ξ") +(rename-modeline emacs-lisp-mode "ξ") (add-hook 'emacs-lisp-mode-hook #'ap/lisp-setup) (add-hook 'emacs-lisp-mode-hook #'turn-on-eldoc-mode)