[Top][All Lists]

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

Re: Getting more info on a variable in Customize buffers

From: Per Abrahamsen
Subject: Re: Getting more info on a variable in Customize buffers
Date: Wed, 05 Jan 2005 09:48:08 +0100
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3 (gnu/linux)

Stefan <address@hidden> writes:

>> And when it was there, it also got (ab)used in Emacs for minor modes.
>> It should have been part of a define-minor-mode instead, but as I
>> remember there already is was one of those.
> We now have a proper `define-minor-mode' (which internally uses :set but
> I guess that's OK).

Not really, that is just fluff.  It still use a variable, so there is
(from a conceptual of view) no advantage of the current
`define-minor-mode' over defcustom.  It is just a thin piece of
syntactical sugar, with no real abstraction.

But using a variable for minor mode may be the best thing anyway,
since minor modes already by convention have a (real) associated
variable.  Overloading this variable, as is what we have done,
probably introduces less complexity than introducing a new "minor
mode" abstraction.

> so I suggested
>   (defkeymap foo-map
>      '((X1 Y1)
>        (X2 Y2)
>        (X3 Y3)
>        (X4 Y4)))
> with some additional options like :inherit and :suppress.  What it does
> w.r.t Custom can then be adjusted as you please and improved over time.

I believe the API, the UI, and save/load backend (for changes) has to
be designed together.  Comming up with an API or UI or even save/load
backend individually only makes the other parts way harder, like it
did for define-minor-mode.

Again, keymaps have an associated variable, so resuing that as was
done by Alex' hack again would probably be the right thing to do.

reply via email to

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