;;; easy-mmode.el --- easy definition for major and minor modes
-;; Copyright (C) 1997, 2000-2015 Free Software Foundation, Inc.
+;; Copyright (C) 1997, 2000-2016 Free Software Foundation, Inc.
;; Author: Georges Brun-Cottan <Georges.Brun-Cottan@inria.fr>
;; Maintainer: Stefan Monnier <monnier@gnu.org>
"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-+\\'" ""
:variable PLACE The location to use instead of the variable MODE to store
the state of the mode. This can be simply a different
named variable, or a generalized variable.
- PLACE can also be of the form \(GET . SET), where GET is
+ PLACE can also be of the form (GET . SET), where GET is
an expression that returns the current state, and SET is
a function that takes one argument, the new state, and
sets it. If you specify a :variable, this function does
For example, you could write
(define-minor-mode foo-mode \"If enabled, foo on you!\"
- :lighter \" Foo\" :require 'foo :global t :group 'hassle :version \"27.5\"
+ :lighter \" Foo\" :require \\='foo :global t :group \\='hassle :version \"27.5\"
...BODY CODE...)"
(declare (doc-string 2)
(debug (&define name string-or-null-p
- [&optional [¬ keywordp] sexp
- &optional [¬ keywordp] sexp
- &optional [¬ keywordp] sexp]
- [&rest [keywordp sexp]]
- def-body))
- (indent 1))
+ [&optional [¬ keywordp] sexp
+ &optional [¬ keywordp] sexp
+ &optional [¬ keywordp] sexp]
+ [&rest [keywordp sexp]]
+ def-body)))
;; Allow skipping the first three args.
(cond
(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')
ARG is omitted or nil.
%s is enabled in all buffers where
-\`%s' would do it.
+`%s' would do it.
See `%s' for more information on %s."
pretty-name pretty-global-name
pretty-name turn-on mode pretty-name)
:inherit Parent keymap.
:group Ignored.
:suppress Non-nil to call `suppress-keymap' on keymap,
- 'nodigits to suppress digits as prefix arguments."
+ `nodigits' to suppress digits as prefix arguments."
(let (inherit dense suppress)
(while args
(let ((key (pop args))