diff options
author | Alan Pearce | 2014-04-26 13:00:58 +0100 |
---|---|---|
committer | Alan Pearce | 2014-04-26 13:00:58 +0100 |
commit | a5126cbcea58fd3d424605a8256490a1ea263e50 (patch) | |
tree | 7cd425810029edff1e2562a266e36a0a0405039f /tag-emacs | |
parent | d7a6317804a6445846ea15d886161b593d7da94a (diff) | |
download | nixfiles-a5126cbcea58fd3d424605a8256490a1ea263e50.tar.lz nixfiles-a5126cbcea58fd3d424605a8256490a1ea263e50.tar.zst nixfiles-a5126cbcea58fd3d424605a8256490a1ea263e50.zip |
Emacs: add helper macro for renaming major modes
Diffstat (limited to 'tag-emacs')
-rw-r--r-- | tag-emacs/emacs.d/init.el | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tag-emacs/emacs.d/init.el b/tag-emacs/emacs.d/init.el index c693a47b..c0134ee4 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." |