all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vitalie Spinu <spinuvit@gmail.com>
To: Stefan Monnier <monnier@IRO.UMontreal.CA>
Cc: 20420@debbugs.gnu.org
Subject: bug#20420: 25.0.50; eieio methods with optional arguments now fail
Date: Sat, 25 Apr 2015 20:25:39 +0200	[thread overview]
Message-ID: <87sibonjz0.fsf@gmail.com> (raw)
In-Reply-To: <jwv1tj8e0pl.fsf-monnier+emacsbugs@gnu.org> (Stefan Monnier's message of "Sat, 25 Apr 2015 10:41:40 -0400")

 >>> Stefan Monnier on Sat, 25 Apr 2015 10:41:40 -0400 wrote:


 > That tells me *how* you used it, not *where*.

I was using it in polymode package for a generic indentation
functionality:

  https://github.com/vspinu/polymode/blob/master/polymode-methods.el#L530

 >> As we are on this topic how about allowing for implicit dispatch on the
 >> arbitrary context? I mean something along the following lines:

 > Quoting from cl-generic.el:

 >    ;; TODO:
 >    [...]
 >    ;; - A way to dispatch on the context (e.g. the major-mode, some global
 >    ;;   variable, you name it).
 >    [...]
 >    ;;; Just for kicks: dispatch on major-mode
 >    ;;
 >    ;; Here's how you'd use it:
 >    ;;   (cl-defmethod foo ((x (major-mode text-mode)) y z) ...)
 >    ;; And then
 >    ;;     (foo 'major-mode toto titi)
 >    ;;
 >    ;; FIXME: Better would be to do that via dispatch on an "implicit argument".
 >    ;; E.g. (cl-defmethod foo (y z &context (major-mode text-mode)) ...)

Aha. Cool! I will have a look. Is there a more elaborate documentation
somewhere? Particularly I don't see "specializer" and "generalizer"
being properly defined anywhere.


  Vitalie





  reply	other threads:[~2015-04-25 18:25 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-24 19:28 bug#20420: 25.0.50; eieio methods with optional arguments now fail Vitalie Spinu
2015-04-24 20:42 ` Stefan Monnier
2015-04-24 23:35   ` Vitalie Spinu
2015-04-25 14:41     ` Stefan Monnier
2015-04-25 18:25       ` Vitalie Spinu [this message]
2015-04-26  4:02         ` Stefan Monnier
2015-04-26 12:00           ` Vitalie Spinu
2015-04-27  4:43             ` Stefan Monnier
2015-05-12  4:19           ` Stefan Monnier
2015-05-12 14:23             ` Vitalie Spinu
2016-05-14 23:01               ` Dmitry Gutov
2016-05-15  1:55                 ` 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

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

  git send-email \
    --in-reply-to=87sibonjz0.fsf@gmail.com \
    --to=spinuvit@gmail.com \
    --cc=20420@debbugs.gnu.org \
    --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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.