]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/easy-mmode.el
Merge from origin/emacs-25
[gnu-emacs] / lisp / emacs-lisp / easy-mmode.el
index 5543e920c6750df9f275b8bc65a399670877177f..38295c302eacbba81c2a356857a7784fd46a2c26 100644 (file)
@@ -68,6 +68,7 @@ replacing its case-insensitive matches with the literal string in LIGHTER."
                                     "toggle-\\|-mode\\'" ""
                                      (symbol-name mode))))
                       " mode")))
+    (setq name (replace-regexp-in-string "\\`Global-" "Global " name))
     (if (not (stringp lighter)) name
       ;; Strip leading and trailing whitespace from LIGHTER.
       (setq lighter (replace-regexp-in-string "\\`\\s-+\\|\\s-+\\'" ""
@@ -107,9 +108,10 @@ Optional LIGHTER is displayed in the mode line when the mode is on.
 Optional KEYMAP is the default keymap bound to the mode keymap.
   If non-nil, it should be a variable name (whose value is a keymap),
   or an expression that returns either a keymap or a list of
-  arguments for `easy-mmode-define-keymap'.  If you supply a KEYMAP
-  argument that is not a symbol, this macro defines the variable
-  MODE-map and gives it the value that KEYMAP specifies.
+  (KEY . BINDING) pairs where KEY and BINDING are suitable for
+  `define-key'.  If you supply a KEYMAP argument that is not a
+  symbol, this macro defines the variable MODE-map and gives it
+  the value that KEYMAP specifies.
 
 BODY contains code to execute each time the mode is enabled or disabled.
   It is executed after toggling the mode, and before running MODE-hook.
@@ -152,12 +154,11 @@ For example, you could write
     ...BODY CODE...)"
   (declare (doc-string 2)
            (debug (&define name string-or-null-p
-                           [&optional [&not keywordp] sexp
-                            &optional [&not keywordp] sexp
-                            &optional [&not keywordp] sexp]
-                           [&rest [keywordp sexp]]
-                           def-body))
-           (indent 1))
+                          [&optional [&not keywordp] sexp
+                           &optional [&not keywordp] sexp
+                           &optional [&not keywordp] sexp]
+                          [&rest [keywordp sexp]]
+                          def-body)))
 
   ;; Allow skipping the first three args.
   (cond
@@ -252,7 +253,8 @@ Use the command `%s' to change this variable." pretty-name mode))
          (t
          (let ((base-doc-string
                  (concat "Non-nil if %s is enabled.
-See the command `%s' for a description of this minor mode."
+See the `%s' command
+for a description of this minor mode."
                          (if body "
 Setting this variable directly does not take effect;
 either customize it (see the info node `Easy Customization')