# HG changeset patch # User Eli Zaretskii # Date 1115581086 0 # Node ID 14a20ce3663843a10c584e65b5e3a0db588a09fb # Parent c93c7826e33490ba5535fc84e0a3151cafcb36b7 (easy-mmode-pretty-mode-name): Improve commentary. diff -r c93c7826e334 -r 14a20ce36638 lisp/emacs-lisp/easy-mmode.el --- a/lisp/emacs-lisp/easy-mmode.el Sun May 08 19:34:28 2005 +0000 +++ b/lisp/emacs-lisp/easy-mmode.el Sun May 08 19:38:06 2005 +0000 @@ -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