From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#10754: define-minor-mode and doc of derived mode Date: Tue, 07 Feb 2012 13:02:32 -0500 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1328637808 28245 80.91.229.3 (7 Feb 2012 18:03:28 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 7 Feb 2012 18:03:28 +0000 (UTC) To: 10754@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 07 19:03:27 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RupO0-0001Qi-9R for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2012 19:03:24 +0100 Original-Received: from localhost ([::1]:59294 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RupNz-00037q-S6 for geb-bug-gnu-emacs@m.gmane.org; Tue, 07 Feb 2012 13:03:23 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:38054) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RupNo-00036x-9r for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2012 13:03:21 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RupNi-0001tp-Cb for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2012 13:03:12 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:55627) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RupNi-0001th-8S for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2012 13:03:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1RupOc-0001Jz-Lz for bug-gnu-emacs@gnu.org; Tue, 07 Feb 2012 13:04:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 07 Feb 2012 18:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10754 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.13286378135037 (code B ref -1); Tue, 07 Feb 2012 18:04:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 7 Feb 2012 18:03:33 +0000 Original-Received: from localhost ([127.0.0.1]:59250 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RupO9-0001JC-C6 for submit@debbugs.gnu.org; Tue, 07 Feb 2012 13:03:33 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]:46954 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1RupO5-0001J3-Qw for submit@debbugs.gnu.org; Tue, 07 Feb 2012 13:03:31 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1RupNA-0002cB-As; Tue, 07 Feb 2012 13:02:32 -0500 X-Spook: clones Israel Leitrim Clinton AVIP high security Rumsfeld X-Ran: /2PrfEJf3&,Y7Hnm`79HPq@0Xrk9uR%b@v$X.N%"qBBb<|U'YN>0Sy<5ol3Ken)2s?h].s X-Hue: white X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:56658 Archived-At: 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.