GNU bug report logs - #25294
26.0.50; Allow more catch-all values for cl-defmethod's &context plus major-mode specializer

Previous Next

Package: emacs;

Reported by: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Date: Thu, 29 Dec 2016 19:14:02 UTC

Severity: wishlist

Tags: moreinfo

Found in version 26.0.50

Done: Eric Abrahamsen <eric <at> ericabrahamsen.net>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Eric Abrahamsen <eric <at> ericabrahamsen.net>
To: Noam Postavsky <npostavs <at> users.sourceforge.net>
Cc: 25294 <at> debbugs.gnu.org
Subject: bug#25294: 26.0.50; Allow more catch-all values for cl-defmethod's &context plus major-mode specializer
Date: Wed, 13 Dec 2017 16:06:39 -0800
Noam Postavsky <npostavs <at> users.sourceforge.net> writes:

> Eric Abrahamsen <eric <at> ericabrahamsen.net> writes:
>
>> +Generic functions provide a new argument-list keyword,
>
> The way you phrased this might lead me to think that the &context
> keyword should go in the cl-defgeneric form (maybe it's not so bad when
> seeing in context under cl-defmethod, in patch form it's a bit
> disconnected).

Maybe so, yes. I'll look at it in context and see if I can't make that a
little clearer.

>> +@code{&context}, which can be used to introduce extra specializers
>> +that test the general environment in which the method is run.  This
>> +keyword should appear after the list of required arguments, but before
>> +any @code{&rest} or @code{&optional} keywords.
>
> I wonder if it would be clearer to add this to the @defmac header?
>
>     @defmac cl-defmethod name [qualifier] arguments [&context (expr spec)@dots{}] &rest [docstring] body
>
> Hmm, maybe that ends up being too long.

I never found those things very helpful, and that does look a little long...




This bug report was last modified 7 years and 210 days ago.

Previous Next


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