]> git.eshelyaron.com Git - emacs.git/commitdiff
* lisp/emacs-lisp/easy-mmode.el (easy-mmode-pretty-mode-name):
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 27 Jun 2012 14:05:24 +0000 (10:05 -0400)
committerStefan Monnier <monnier@iro.umontreal.ca>
Wed, 27 Jun 2012 14:05:24 +0000 (10:05 -0400)
Strip "toggle-" if any.

lisp/ChangeLog
lisp/emacs-lisp/easy-mmode.el

index be72f90f087f9236b59b2d287d81c3ba963f70a1..0de89c4799075fcb14353d64bfcc2c7d264813f3 100644 (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>
 
        * info.el (Info-default-directory-list): Move here from paths.el.
index 4da48805278a1146010d799f9bb9fcdd49ee5b6d..ee4e36a9eba31bfc25fea24281436d7584f7c6c7 100644 (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.