* 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

@ -1,3 +1,8 @@
2012-06-27 Stefan Monnier <monnier@iro.umontreal.ca>
* emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name):
Strip "toggle-" if any.
2012-06-27 Glenn Morris <rgm@gnu.org> 2012-06-27 Glenn Morris <rgm@gnu.org>
* info.el (Info-default-directory-list): Move here from paths.el. * info.el (Info-default-directory-list): Move here from paths.el.

View file

@ -65,7 +65,8 @@ replacing its case-insensitive matches with the literal string in LIGHTER."
;; "foo-bar-minor" -> "Foo-Bar-Minor" ;; "foo-bar-minor" -> "Foo-Bar-Minor"
(capitalize (replace-regexp-in-string (capitalize (replace-regexp-in-string
;; "foo-bar-minor-mode" -> "foo-bar-minor" ;; "foo-bar-minor-mode" -> "foo-bar-minor"
"-mode\\'" "" (symbol-name mode)))) "toggle-\\|-mode\\'" ""
(symbol-name mode))))
" mode"))) " mode")))
(if (not (stringp lighter)) name (if (not (stringp lighter)) name
;; Strip leading and trailing whitespace from LIGHTER. ;; Strip leading and trailing whitespace from LIGHTER.