emacs-bug-tracker
[Top][All Lists]
Advanced

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

[debbugs-tracker] bug#19685: closed ([PATCH] define-minor-mode docstring


From: GNU bug Tracking System
Subject: [debbugs-tracker] bug#19685: closed ([PATCH] define-minor-mode docstring generation bug)
Date: Wed, 18 Feb 2015 01:06:02 +0000

Your message dated Wed, 18 Feb 2015 01:04:16 +0000
with message-id <address@hidden>
and subject line Re: define-minor-mode docstring generation bug
has caused the debbugs.gnu.org bug report #19685,
regarding [PATCH] define-minor-mode docstring generation bug
to be marked as done.

(If you believe you have received this mail in error, please contact
address@hidden)


-- 
19685: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=19685
GNU Bug Tracking System
Contact address@hidden with problems
--- Begin Message --- Subject: [PATCH] define-minor-mode docstring generation bug Date: Sun, 25 Jan 2015 08:52:42 +0000
Try this:
(define-minor-mode foo "foo" :global t)

The variable it creates includes a docstring with

⌜Setting this variable directly does not take effect⌝.

That's a bug.

The attached dmm-docstring-gen-bug.patch fixes it.

Also attached is dmm-docstring-clarification.patch. (Not a bug, but might as 
well include it here.)

--- emacs-24.4/lisp/emacs-lisp/easy-mmode.el
+++ emacs-24.4/lisp/emacs-lisp/easy-mmode.el
@@ -158,7 +158,8 @@
   ;; Allow skipping the first three args.
   (cond
    ((keywordp init-value)
-    (setq body `(,init-value ,lighter ,keymap ,@body)
+    (setq body (if keymap `(,init-value ,lighter ,keymap ,@body)
+                `(,init-value ,lighter))
          init-value nil lighter nil keymap nil))
    ((keywordp lighter)
     (setq body `(,lighter ,keymap ,@body) lighter nil keymap nil))
--- emacs-24.4/lisp/emacs-lisp/easy-mmode.el
+++ emacs-24.4/lisp/emacs-lisp/easy-mmode.el
@@ -114,9 +114,11 @@
 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):
+  alternating keywords and values.  If you provide BODY, then you must
+  provide INIT-VALUE, LIGHTER, and KEYMAP, or provide at least one
+  keyword argument, or both; otherwise, BODY would be misinterpreted.
+  The 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\".

--- End Message ---
--- Begin Message --- Subject: Re: define-minor-mode docstring generation bug Date: Wed, 18 Feb 2015 01:04:16 +0000
Fixed in trunk.


--- End Message ---

reply via email to

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