GNU bug report logs -
#19685
[PATCH] define-minor-mode docstring generation bug
Previous Next
Reported by: Kelly Dean <kelly <at> prtime.org>
Date: Sun, 25 Jan 2015 08:54:02 UTC
Severity: normal
Tags: patch
Done: Kelly Dean <kelly <at> prtime.org>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 19685 in the body.
You can then email your comments to 19685 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-gnu-emacs <at> gnu.org
:
bug#19685
; Package
emacs
.
(Sun, 25 Jan 2015 08:54:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Kelly Dean <kelly <at> prtime.org>
:
New bug report received and forwarded. Copy sent to
bug-gnu-emacs <at> gnu.org
.
(Sun, 25 Jan 2015 08:54:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
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.)
[dmm-docstring-gen-bug.patch (text/x-diff, inline)]
--- 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))
[dmm-docstring-clarification.patch (text/x-diff, inline)]
--- 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\".
Reply sent
to
Kelly Dean <kelly <at> prtime.org>
:
You have taken responsibility.
(Wed, 18 Feb 2015 01:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Kelly Dean <kelly <at> prtime.org>
:
bug acknowledged by developer.
(Wed, 18 Feb 2015 01:06:02 GMT)
Full text and
rfc822 format available.
Message #10 received at 19685-done <at> debbugs.gnu.org (full text, mbox):
Fixed in trunk.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Wed, 18 Mar 2015 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 10 years and 156 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.