unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10754: define-minor-mode and doc of derived mode
@ 2012-02-07 18:02 Glenn Morris
  2012-02-07 20:27 ` Glenn Morris
  0 siblings, 1 reply; 28+ messages in thread
From: Glenn Morris @ 2012-02-07 18:02 UTC (permalink / raw)
  To: 10754

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.





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

end of thread, other threads:[~2018-07-02  3:36 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-07 18:02 bug#10754: define-minor-mode and doc of derived mode Glenn Morris
2012-02-07 20:27 ` Glenn Morris
2018-06-07 11:20   ` John Shahid
2018-06-07 13:46     ` Drew Adams
2018-06-08  2:25       ` John Shahid
2018-06-08 21:45         ` John Shahid
2018-06-16 10:52           ` Eli Zaretskii
2018-06-16 17:23             ` Stefan Monnier
2018-06-17 15:55               ` John Shahid
2018-06-17 18:31                 ` Stefan Monnier
2018-06-17 19:45                   ` John Shahid
2018-06-17 21:00                     ` Stefan Monnier
2018-06-17 23:19                       ` John Shahid
2018-06-18 13:47                         ` Stefan Monnier
2018-06-20 19:33                           ` John Shahid
2018-06-20 21:55                             ` Stefan Monnier
2018-06-27 21:26                               ` John Shahid
2018-06-27 21:31                                 ` John Shahid
2018-06-29  1:02                                   ` Stefan Monnier
2018-06-29 13:45                                     ` John Shahid
2018-06-29 13:55                                       ` Stefan Monnier
2018-06-29 14:52                                         ` John Shahid
2018-06-29 15:12                                           ` Noam Postavsky
2018-06-29 15:48                                             ` John Shahid
2018-06-30  7:55                                               ` Eli Zaretskii
2018-06-30 20:44                                                 ` John Shahid
2018-07-02  3:36                                                   ` Stefan Monnier
2018-06-30  7:56                                         ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).