emacs-devel
[Top][All Lists]
Advanced

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

Re: [CVS] f7, f8 bound..


From: Per Abrahamsen
Subject: Re: [CVS] f7, f8 bound..
Date: Mon, 09 Sep 2002 17:45:04 +0200
User-agent: Gnus/5.090007 (Oort Gnus v0.07) Emacs/21.1 (sparc-sun-solaris2.8)

"Stefan Monnier" <monnier+gnu/address@hidden> writes:

> Per's solution is to either
> rebuild the whole keymap each time (which requires saving its
> original value somewhere) 

That was Alex' original proposal (through code), not mine.

His latest code remembers the old value, which works well enough for
the vast majority of cases.

> The "two maps" approach is a possibility.
>
> Basically, the idea is to keep the original map as the parent
> of the actual map.  So when custom changes the map, it does:
>
>       (let ((orig (keymap-parent map)))
>         (setq map (make-sparse-keymap))
>         (set-keymap-parent map orig)
>           ...add/remove bindings...)
>
> The problem is that any changes made to `map' rather than to its parent
> are lost without regards to whether the changes were made by custom or not.

Which is why the DOC string said "Automatically created by customize,
do not touch." (or something like that).

Miles' current idea is to build this into a rather low level
via. define-key and friends, which will allow the two keymaps to be
invisible to both the user and all applications except customize.

I believe Alex current code is se much better than the status quo that
I'd hate to see it rejected because of an even better paper solution.
Also, as far as I can see, we should be able to replace Alex code with
a "define-key" solution at any time someone implements it, with no
changes in the programmer interface.





reply via email to

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