unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: 22336@debbugs.gnu.org, dgutov@yandex.ru
Subject: bug#22336: 25.0.50; cl-generic.el features are not documented in ELisp manual
Date: Sun, 24 Jan 2016 16:34:01 +0200	[thread overview]
Message-ID: <83h9i33v3a.fsf@gnu.org> (raw)
In-Reply-To: <jwvy4bf374u.fsf-monnier+emacsbugs@gnu.org> (message from Stefan Monnier on Sun, 24 Jan 2016 00:03:21 -0500)

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Eli Zaretskii <eliz@gnu.org>,  22336@debbugs.gnu.org
> Date: Sun, 24 Jan 2016 00:03:21 -0500
> 
> > (cl-defgeneric foo (a)
> >   (:method ((s string)) "stringy!")
> >   (:method ((a array)) :four)
> >   10)
> 
> I implemented this :method thingy simply because CLOS allows it, but I'm
> not sure it's worth documenting.

':method' is in the doc string, which for me was a clear sign it
should be documented.

> > But the docstrings don't mention any of the possible values of TYPE (except
> > (eql ...)), not just "plain old" ones. So I'm not clear on what exactly you
> > consider an omission here. cl-defmethod docstring should probably enumerate
> > the possible types (aside from the mentioned ones, TYPE can be (head ...)
> > or a name of cl-struct, like the commentary says).
> 
> Actually, the only "builtin" specializer is t (the generic one).
> All other ones are defined via cl-generic-define-generalizer, and we
> should improve cl-defmethod's docstring so that it automatically
> mentions all the specializers that happen to be currently defined
> (i.e. in a dynamic way, just like pcase's docstring dynamically lists
> the patterns currently defined via pcase-defmacro).

Such dynamically-updated doc string would be very good to have, I
think, but I needed to work with what was there, and of course
couldn't use the kind of intimate knowledge of the implementation that
you have.





  reply	other threads:[~2016-01-24 14:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-09  9:06 bug#22336: 25.0.50; cl-generic.el features are not documented in ELisp manual Eli Zaretskii
2016-01-09 10:07 ` Eli Zaretskii
2016-01-16  8:25 ` Eli Zaretskii
2016-01-22 21:17   ` Eli Zaretskii
2016-01-23  5:29     ` Dmitry Gutov
2016-01-23  6:06       ` Eli Zaretskii
2016-01-23  8:20         ` Dmitry Gutov
2016-01-23 12:51           ` Eli Zaretskii
2016-01-23 17:02             ` Dmitry Gutov
2016-01-23 17:21               ` Eli Zaretskii
2016-01-24  0:45                 ` Dmitry Gutov
2016-01-24  0:48                   ` Dmitry Gutov
2016-01-24  5:03               ` Stefan Monnier
2016-01-24 14:34                 ` Eli Zaretskii [this message]
2016-01-24 23:00                   ` Stefan Monnier

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=83h9i33v3a.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=22336@debbugs.gnu.org \
    --cc=dgutov@yandex.ru \
    --cc=monnier@iro.umontreal.ca \
    /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).