help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: going back in time


From: Štěpán Němec
Subject: Re: going back in time
Date: Tue, 27 Jul 2010 14:22:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Eric Abrahamsen <eric@ericabrahamsen.net> writes:

> Štěpán Němec <stepnem@gmail.com> writes:
>
>> Andrea Crotti <andrea.crotti.0@gmail.com> writes:
>>> Is there any way to revert back to the last global state (it might be
>>> useful also in other cases of cours)?
>>
>> No (other than redoing your original bindings yourself, obviously).
>> And if a package unconditionally/irreversibly adds global bindings, you
>> can safely say it's badly written and complain to its author. That's
>> what modes and keymaps are for.
>
> Out of curiosity, does unload-feature also unload that feature's
> keybindings? How would a package author provide keybindings in
> reversible way?

(info "(elisp)Unloading")

I don't think it does. The problem is not unloading, but restoring the
original bindings. The package could provide a FEATURE-unload-function
which would restore the bindings previously saved (which would also have
to be done manually). But as I said, I can't think of a legitimate
reason for a package to mess with global-map. If you think defining a
mode and a keymap for the functionality you provide is unnecessary, just
define the commands and put some keybinding recommendations into a
commentary.

Štěpán



reply via email to

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