From 3fd56834d9d553991071f512460cb01b75d6069c Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Wed, 27 Jun 2012 10:05:24 -0400 Subject: [PATCH] * lisp/emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name): Strip "toggle-" if any. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/easy-mmode.el | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index be72f90f087..0de89c47990 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-06-27 Stefan Monnier + + * emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name): + Strip "toggle-" if any. + 2012-06-27 Glenn Morris * info.el (Info-default-directory-list): Move here from paths.el. diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 4da48805278..ee4e36a9eba 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -65,7 +65,8 @@ replacing its case-insensitive matches with the literal string in LIGHTER." ;; "foo-bar-minor" -> "Foo-Bar-Minor" (capitalize (replace-regexp-in-string ;; "foo-bar-minor-mode" -> "foo-bar-minor" - "-mode\\'" "" (symbol-name mode)))) + "toggle-\\|-mode\\'" "" + (symbol-name mode)))) " mode"))) (if (not (stringp lighter)) name ;; Strip leading and trailing whitespace from LIGHTER. -- 2.39.2