all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Glenn Morris <rgm@gnu.org>
To: 10754@debbugs.gnu.org
Subject: bug#10754: define-minor-mode and doc of derived mode
Date: Tue, 07 Feb 2012 13:02:32 -0500	[thread overview]
Message-ID: <idhaz2o72f.fsf@fencepost.gnu.org> (raw)

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	other threads:[~2012-02-07 18:02 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-07 18:02 Glenn Morris [this message]
2012-02-07 20:27 ` bug#10754: define-minor-mode and doc of derived mode 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=idhaz2o72f.fsf@fencepost.gnu.org \
    --to=rgm@gnu.org \
    --cc=10754@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.