all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#18349: 24.3.92; define-minor-mode: generated doc of hook: mode vs. modefun
@ 2014-08-28 22:26 Michael Heerdegen
  2014-08-29  2:01 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Heerdegen @ 2014-08-28 22:26 UTC (permalink / raw
  To: 18349

[-- Attachment #1: Type: text/plain, Size: 418 bytes --]


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?


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: easy-mmode.patch --]
[-- Type: text/x-diff, Size: 852 bytes --]

*** /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.

[-- Attachment #3: Type: text/plain, Size: 416 bytes --]



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


^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#18349: 24.3.92; define-minor-mode: generated doc of hook: mode vs. modefun
  2014-08-28 22:26 bug#18349: 24.3.92; define-minor-mode: generated doc of hook: mode vs. modefun Michael Heerdegen
@ 2014-08-29  2:01 ` Stefan Monnier
  2014-08-29 20:39   ` Michael Heerdegen
  0 siblings, 1 reply; 3+ messages in thread
From: Stefan Monnier @ 2014-08-29  2:01 UTC (permalink / raw
  To: Michael Heerdegen; +Cc: 18349

> Is this the right thing?

Yes, it is.  Thanks for catching it, feel free to install,


        Stefan





^ permalink raw reply	[flat|nested] 3+ messages in thread

* bug#18349: 24.3.92; define-minor-mode: generated doc of hook: mode vs. modefun
  2014-08-29  2:01 ` Stefan Monnier
@ 2014-08-29 20:39   ` Michael Heerdegen
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Heerdegen @ 2014-08-29 20:39 UTC (permalink / raw
  To: Stefan Monnier; +Cc: 18349

Stefan Monnier <monnier@IRO.UMontreal.CA> writes:

> Yes, it is.  Thanks for catching it, feel free to install,

Installed in trunk in revision 117777.


Thanks,

Michael.





^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-08-29 20:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-08-28 22:26 bug#18349: 24.3.92; define-minor-mode: generated doc of hook: mode vs. modefun Michael Heerdegen
2014-08-29  2:01 ` Stefan Monnier
2014-08-29 20:39   ` Michael Heerdegen

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.