bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#26301: 24.5; `define-derived-mode': different signatures for doc str


From: Lars Ingebrigtsen
Subject: bug#26301: 24.5; `define-derived-mode': different signatures for doc string & manual
Date: Sat, 27 Jul 2019 12:03:38 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]