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

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

bug#10754: define-minor-mode and doc of derived mode


From: Glenn Morris
Subject: bug#10754: define-minor-mode and doc of derived mode
Date: Tue, 07 Feb 2012 13:02:32 -0500
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Package: emacs
Version: 24.0.93
Severity: wishlist

If you use a nil DOC argument with define-minor-mode, it constructs a
doc string for you. The information in this doc string is almost always
applicable to the derived mode (it explains how the mode's ARG works).
Often you will basically want to duplicate this info in the mode's doc,
and add a little bit more. So it would be nice if there was some token
you could write in the DOC arg that gets replaced with the default
doc-string.

Eg:

(define-minor-mode foo-mode "%default-doc.

Foo mode is fantastic because of these reasons... " ...)


This would also save you having to change the doc of foo-mode if the way
define-minor-mode treats ARG changes again.

I don't know whether %default-doc (or whatever) should include the first
line "Toggle ... on or off.", in which case it would be restricted to be
at the start of DOC, or just the part about ARG, in which case it could
come anywhere in DOC.





reply via email to

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