emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r99998: Doc fix for define-minor-m


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r99998: Doc fix for define-minor-mode (Bug#6880).
Date: Sun, 22 Aug 2010 15:30:26 -0400
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 99998
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Sun 2010-08-22 15:30:26 -0400
message:
  Doc fix for define-minor-mode (Bug#6880).
  
  * doc/lispref/modes.texi (Defining Minor Modes): Doc fix (Bug#6880).
  
  * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880).
modified:
  doc/lispref/ChangeLog
  doc/lispref/modes.texi
  lisp/ChangeLog
  lisp/emacs-lisp/easy-mmode.el
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2010-08-19 23:23:13 +0000
+++ b/doc/lispref/ChangeLog     2010-08-22 19:30:26 +0000
@@ -1,3 +1,7 @@
+2010-08-22  Chong Yidong  <address@hidden>
+
+       * modes.texi (Defining Minor Modes): Doc fix (Bug#6880).
+
 2010-08-19  Chong Yidong  <address@hidden>
 
        * objects.texi (Bool-Vector Type): Minor definition tweak (Bug#6878).

=== modified file 'doc/lispref/modes.texi'
--- a/doc/lispref/modes.texi    2010-07-29 00:58:16 +0000
+++ b/doc/lispref/modes.texi    2010-08-22 19:30:26 +0000
@@ -1411,14 +1411,20 @@
 when the mode is enabled; if it is @code{nil}, the mode is not displayed
 in the mode line.
 
-The optional argument @var{keymap} specifies the keymap for the minor mode.
-It can be a variable name, whose value is the keymap, or it can be an alist
-specifying bindings in this form:
+The optional argument @var{keymap} specifies the keymap for the minor
+mode.  If address@hidden, it should be a variable name (whose value is
+a keymap), a keymap, or an alist of the form
 
 @example
 (@var{key-sequence} . @var{definition})
 @end example
 
address@hidden
+where each @var{key-sequence} and @var{definition} are arguments
+suitable for passing to @code{define-key} (@pxref{Changing Key
+Bindings}).  If @var{keymap} is a keymap or an alist, this also
+defines the variable @address@hidden
+
 The above three arguments @var{init-value}, @var{lighter}, and
 @var{keymap} can be (partially) omitted when @var{keyword-args} are
 used.  The @var{keyword-args} consist of keywords followed by

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2010-08-22 04:12:25 +0000
+++ b/lisp/ChangeLog    2010-08-22 19:30:26 +0000
@@ -1,3 +1,7 @@
+2010-08-22  Chong Yidong  <address@hidden>
+
+       * emacs-lisp/easy-mmode.el (define-minor-mode): Doc fix (Bug#6880).
+
 2010-08-21  Vinicius Jose Latorre  <address@hidden>
 
        * whitespace.el: Fix slow cursor movement (Bug#6172).  Reported by

=== modified file 'lisp/emacs-lisp/easy-mmode.el'
--- a/lisp/emacs-lisp/easy-mmode.el     2010-01-13 08:35:10 +0000
+++ b/lisp/emacs-lisp/easy-mmode.el     2010-08-22 19:30:26 +0000
@@ -86,25 +86,23 @@
 ;;;###autoload
 (defmacro define-minor-mode (mode doc &optional init-value lighter keymap 
&rest body)
   "Define a new minor mode MODE.
-This function defines the associated control variable MODE, keymap MODE-map,
-and toggle command MODE.
-
+This defines the control variable MODE and the toggle command MODE.
 DOC is the documentation for the mode toggle command.
+
 Optional INIT-VALUE is the initial value of the mode's variable.
 Optional LIGHTER is displayed in the modeline when the mode is on.
-Optional KEYMAP is the default (defvar) keymap bound to the mode keymap.
-  If it is a list, it is passed to `easy-mmode-define-keymap'
-  in order to build a valid keymap.  It's generally better to use
-  a separate MODE-map variable than to use this argument.
-The above three arguments can be skipped if keyword arguments are
-used (see below).
-
-BODY contains code to execute each time the mode is activated or deactivated.
-  It is executed after toggling the mode,
-  and before running the hook variable `MODE-hook'.
-  Before the actual body code, you can write keyword arguments (alternating
-  keywords and values).  These following keyword arguments are supported (other
-  keywords will be passed to `defcustom' if the minor mode is global):
+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),
+  a keymap, or a list of arguments for `easy-mmode-define-keymap'.
+  If KEYMAP is a keymap or list, this also defines the variable MODE-map.
+
+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.
+  Before the actual body code, you can write keyword arguments, i.e.
+  alternating keywords and values.  These following special keywords
+  are supported (other keywords are passed to `defcustom' if the minor
+  mode is global):
+
 :group GROUP   Custom group name to use in all generated `defcustom' forms.
                Defaults to MODE without the possible trailing \"-mode\".
                Don't use this default group name unless you have written a


reply via email to

[Prev in Thread] Current Thread [Next in Thread]