diff options
Diffstat (limited to 'lisp/emacs-lisp/easy-mmode.el')
-rw-r--r-- | lisp/emacs-lisp/easy-mmode.el | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/easy-mmode.el b/lisp/emacs-lisp/easy-mmode.el index 94db7cc586f..a02f7be7d13 100644 --- a/lisp/emacs-lisp/easy-mmode.el +++ b/lisp/emacs-lisp/easy-mmode.el @@ -61,9 +61,11 @@ If provided, LIGHTER will be used to help choose capitalization by, replacing its case-insensitive matches with the literal string in LIGHTER." (let* ((case-fold-search t) - ;; Produce "Foo-Bar Minor mode" from foo-bar-minor-mode. + ;; Produce "Foo-Bar minor mode" from foo-bar-minor-mode. (name (concat (replace-regexp-in-string - ;; "Foo-Bar-Minor" -> "Foo-Bar minor" + ;; If the original mode name included "-minor" (some + ;; of them don't, e.g. auto-revert-mode), then + ;; replace it with " minor". "-Minor" " minor" ;; "foo-bar-minor" -> "Foo-Bar-Minor" (capitalize (replace-regexp-in-string |