unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Noam Postavsky <npostavs@gmail.com>
Cc: 26301@debbugs.gnu.org
Subject: bug#26301: 24.5; `define-derived-mode': different signatures for doc string & manual
Date: Sat, 27 Jul 2019 12:03:38 +0200	[thread overview]
Message-ID: <m3mugz94lh.fsf@gnus.org> (raw)
In-Reply-To: <855znokfrs.fsf@gmail.com> (Noam Postavsky's message of "Fri, 26 Jul 2019 10:54:31 -0400")

Noam Postavsky <npostavs@gmail.com> 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





  parent reply	other threads:[~2019-07-27 10:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 15:03 bug#26301: 24.5; `define-derived-mode': different signatures for doc string & manual Drew Adams
2019-07-26 11:04 ` Lars Ingebrigtsen
2019-07-26 14:50   ` Drew Adams
2019-07-26 14:54   ` Noam Postavsky
2019-07-26 15:08     ` Lars Ingebrigtsen
2019-07-26 15:51       ` Drew Adams
2019-07-26 15:38     ` Drew Adams
2019-07-27 10:03     ` Lars Ingebrigtsen [this message]
2019-07-27 16:54       ` Drew Adams
2019-07-27 22:19         ` Michael Heerdegen
2019-07-28  0:01           ` Drew Adams
2019-07-28  0:14             ` Michael Heerdegen

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m3mugz94lh.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=26301@debbugs.gnu.org \
    --cc=npostavs@gmail.com \
    /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 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).