GNU bug report logs -
#18349
24.3.92; define-minor-mode: generated doc of hook: mode vs. modefun
Previous Next
Reported by: michael_heerdegen <at> web.de
Date: Thu, 28 Aug 2014 22:28:01 UTC
Severity: minor
Found in version 24.3.92
Fixed in version 25.1
Done: Glenn Morris <rgm <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hello,
in emacs -Q, eval
(define-minor-mode my-minor-mode
"Doc"
:variable foo
...)
Then, C-h v my-minor-mode-hook:
[...]
Documentation:
Hook run after entering or leaving `foo'.
[...] ^^^^^
This makes no sense, the doc of the hook should include the name of the
mode function, not that of the variable.
That happens e.g. for `read-only-mode-hook'.
Is this the right thing?
[easy-mmode.patch (text/x-diff, inline)]
*** /tmp/ediff9150_DV 2014-08-29 00:18:07.582868434 +0200
--- /home/micha/software/emacs/lisp/emacs-lisp/easy-mmode.el 2014-08-29 00:17:46.634718136 +0200
***************
*** 300,306 ****
,(format "Hook run after entering or leaving `%s'.
No problems result if this variable is not bound.
`add-hook' automatically binds it. (This is true for all hook variables.)"
! mode))
;; Define the minor-mode keymap.
,(unless (symbolp keymap) ;nil is also a symbol.
--- 300,306 ----
,(format "Hook run after entering or leaving `%s'.
No problems result if this variable is not bound.
`add-hook' automatically binds it. (This is true for all hook variables.)"
! modefun))
;; Define the minor-mode keymap.
,(unless (symbolp keymap) ;nil is also a symbol.
[Message part 3 (text/plain, inline)]
Thanks,
Michael.
In GNU Emacs 24.3.92.1 (x86_64-unknown-linux-gnu, GTK+ Version 3.12.2)
of 2014-08-11 on drachen
Windowing system distributor `The X.Org Foundation', version 11.0.11600000
System Description: Debian GNU/Linux testing (jessie)
Important settings:
value of $LC_ALL: de_DE.utf8
value of $LC_COLLATE: C
value of $LC_TIME: C
value of $LANG: de_DE.utf8
locale-coding-system: utf-8-unix
This bug report was last modified 10 years and 230 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.