From a5126cbcea58fd3d424605a8256490a1ea263e50 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Sat, 26 Apr 2014 13:00:58 +0100 Subject: Emacs: add helper macro for renaming major modes --- tag-emacs/emacs.d/init.el | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'tag-emacs') diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index c693a47..c0134ee 100644 --- a/tag-emacs/emacs.d/init.el +++ b/tag-emacs/emacs.d/init.el @@ -11,6 +11,12 @@ (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)))) + ;;; 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 "Hook run when entering any Lisp mode." -- cgit 1.4.1