GNU bug report logs - #10754
define-minor-mode and doc of derived mode

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Tue, 7 Feb 2012 18:04:02 UTC

Severity: wishlist

Found in version 24.0.93

Fixed in version 27.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

From: Glenn Morris <rgm <at> gnu.org>
To: 10754 <at> debbugs.gnu.org
Subject: bug#10754: define-minor-mode and doc of derived mode
Date: Tue, 07 Feb 2012 13:02:32 -0500
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.




This bug report was last modified 6 years and 196 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.