[Top][All Lists]

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

Re: Namespace macros

From: Helmut Eller
Subject: Re: Namespace macros
Date: Mon, 08 Dec 2014 13:52:16 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

On Mon, Dec 08 2014, Artur Malabarba wrote:

>> because 1) "define-minor-mode mode" is
>> really useless for grep
> This will be the case for any namespacing solution. You can work around by
> defining the minor mode after the macro.
> Also, I would be happy to add an option to avoid namespacing the
> `define-minor-mode' form (and similar ones), if anyone wants it.

Some commands like M-x gnus or M-x rmail don't have proper prefixes. I
suppose those would also need to be defined after the macro or with an
option to suppress automatic prefixing.

>> 2) it still uses the "camcorder-" prefix for key
>> bindings.
> This can also be worked around by defining the keymap with a series of
> `define-key' statements instead of doing it inside the `define-minor-mode'.
> Which is something I see a lot of packages doing anyway.

Something like `(([f12] . ,#'stop)) would probably also work.  Not 
exactly an improvement, though.

> Now that I think about it, I can also improve the macro to "look inside" the
> fifth argument of a `define-minor-mode' call even if it's a quoted list,
> since that argument is guaranteed to be a keymap.

I guess that temptation will come up often: just add a special case for
macro X.


reply via email to

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