* lisp/emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name):

Strip "toggle-" if any.
This commit is contained in:
Stefan Monnier 2012-06-27 10:05:24 -04:00
parent 43184b7b88
commit 3fd56834d9
2 changed files with 7 additions and 1 deletions

View file

@ -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.