GNU bug report logs - #26301
24.5; `define-derived-mode': different signatures for doc string & manual

Previous Next

Package: emacs;

Reported by: Drew Adams <drew.adams <at> oracle.com>

Date: Wed, 29 Mar 2017 15:05:01 UTC

Severity: wishlist

Tags: fixed

Found in version 24.5

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Noam Postavsky <npostavs <at> gmail.com>
Cc: 26301 <at> debbugs.gnu.org, Drew Adams <drew.adams <at> oracle.com>
Subject: bug#26301: 24.5; `define-derived-mode': different signatures for doc string & manual
Date: Sat, 27 Jul 2019 12:03:38 +0200
Noam Postavsky <npostavs <at> 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




This bug report was last modified 5 years and 352 days ago.

Previous Next


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