all repos — nixfiles @ a5126cbcea58fd3d424605a8256490a1ea263e50

System and user configuration, managed by nix and home-manager

Emacs: add helper macro for renaming major modes

Alan Pearce
commit

a5126cbcea58fd3d424605a8256490a1ea263e50

parent

d7a6317804a6445846ea15d886161b593d7da94a

1 file changed, 6 insertions(+), 0 deletions(-)

jump to
M tag-emacs/emacs.d/init.eltag-emacs/emacs.d/init.el
@@ -11,6 +11,12 @@ custom-file "~/.emacs.d/custom.el")
(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."