From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Lars Ingebrigtsen Newsgroups: gmane.emacs.bugs Subject: bug#26301: 24.5; `define-derived-mode': different signatures for doc string & manual Date: Sat, 27 Jul 2019 12:03:38 +0200 Message-ID: References: <8cad00f7-f86e-4d12-ad36-05214708aff1@default> <8736itnjkk.fsf@mouse.gnus.org> <855znokfrs.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="265147"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) Cc: 26301@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jul 27 12:04:08 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrJYd-0016sI-Mg for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jul 2019 12:04:07 +0200 Original-Received: from localhost ([::1]:44764 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrJYc-0008H5-La for geb-bug-gnu-emacs@m.gmane.org; Sat, 27 Jul 2019 06:04:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:45743) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hrJYZ-0008Gy-En for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 06:04:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hrJYY-0002NQ-FK for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 06:04:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34781) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hrJYY-0002NJ-C6 for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 06:04:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hrJYY-0005a4-4L for bug-gnu-emacs@gnu.org; Sat, 27 Jul 2019 06:04:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Lars Ingebrigtsen Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 27 Jul 2019 10:04:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 26301 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed Original-Received: via spool by 26301-submit@debbugs.gnu.org id=B26301.156422182521430 (code B ref 26301); Sat, 27 Jul 2019 10:04:02 +0000 Original-Received: (at 26301) by debbugs.gnu.org; 27 Jul 2019 10:03:45 +0000 Original-Received: from localhost ([127.0.0.1]:43602 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrJYH-0005Za-CW for submit@debbugs.gnu.org; Sat, 27 Jul 2019 06:03:45 -0400 Original-Received: from quimby.gnus.org ([80.91.231.51]:35400) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hrJYF-0005ZS-KQ for 26301@debbugs.gnu.org; Sat, 27 Jul 2019 06:03:43 -0400 Original-Received: from cm-84.212.202.86.getinternet.no ([84.212.202.86] helo=stories) by quimby.gnus.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hrJYA-00063H-T9; Sat, 27 Jul 2019 12:03:41 +0200 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAgMAAAAqbBEUAAAADFBMVEWRdqF1WH1RM1JkRmon GwKsAAACOklEQVQokR2OTWsTURiFz2CGrIQUG7qwMSv3FupCRZxgQnQRyNA7DbWJWbnouEgXCf2c zq8ILsSPjWDv2BTED5qQjuhWQTSTa21idmpuaArSNjbpdLzx3T2ccx5exLI1leWnKvbhvAZvxV04 dVMd7zDlwFzreZ7HPN5baCJhuuXygFldu1tF6PwetT02ON3k6zgb/u1VvJTLivoQGqxTYR47yDm4 vUSY5cab2UJpHaGZfH3fjR+bLt+CYQSm3Yy/arjdEywZATVDPhybhvcNM4mkEiQxd8ExD3AtAcgk vnpXyy1isDMa8RfktKaEF5E91lR5NRKKKSPA7Epa1Ygc1ZIBIJytRYhP8gVVAZmbzlQSAoiA68HC lAJh1MTmCjH/Q3BkwocVLav+T6QbSSxfbn2N+gBJGqth2fT+ECIpsiQKfbNT/5SPNGTfpXn02+WX AohQAFyn73fyMSIJCfSMF98dUZMSggRzoXBqZ1xyJEXUZjOcuZMRIitjUWHb7s3kITaj4+DN/s9B Xo5KvnO3QBv60VbbeRSDlETf4KVKJ9OMKf5xDNo6rfCWbb+bEO+0S2+3+cOqkb76GX33F/vR2bVP Exefg78osHouu9WLzn8EX3/GWtp0lTkXNsCtzS/O5Jnik1pwFZxaR/Y9LLUOA1GRWLQ8p/grzv00 6PCs+iuzqDcgAlrOsY07D7o10CHw4t73N/wvdEp5iT9+WqKWImxUX8vVh8s2+pTuh7O9IRygbNHX 8tj0EE7+AUesJ9QiKiRFAAAAAElFTkSuQmCC In-Reply-To: <855znokfrs.fsf@gmail.com> (Noam Postavsky's message of "Fri, 26 Jul 2019 10:54:31 -0400") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.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" Xref: news.gmane.org gmane.emacs.bugs:163829 Archived-At: Noam Postavsky writes: > Docstrings can override the automatically generated signature by using > > (fn ...) > > So maybe we should do that here? I grepped a bit and had a look at what a few other functions that have the same general issue (i.e., that the BODY argument may be prepended with stuff that's "logically" a different argument): (defmacro cl-defgeneric (name args &rest options-and-methods) \(fn NAME ARGS [DOC-STRING] [OPTIONS-AND-METHODS...] &rest DEFAULT-BODY) (defmacro cl-defmethod (name args &rest body) \(fn NAME [QUALIFIER] ARGS &rest [DOCSTRING] BODY)" (defmacro pcase-defmacro (name args &rest body) \(fn NAME ARGS [DOC] &rest BODY...) So if we model ourself after cl-defgeneric here, that'd be: (defmacro define-derived-mode (child parent name &optional docstring &rest body) \(fn CHILD PARENT NAME [DOCSTRING] [KEYWORDS...] &rest BODY) So I've now done this and adjusted the rest of the doc string accordingly. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog: http://lars.ingebrigtsen.no