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:14:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.2 (gnu/linux)

Andrea Crotti <andrea.crotti.0@gmail.com> writes:

>>
>> 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.
>>
>> Štěpán
>
> Yes of course it's not easy, but I think there could be something like
> (save-global-excursion
>         command
>
> which could first save the global configuration and then execute a
> command.
>
> Would it maybe be too slow?
> At least the global key mapping and variable values I think it could be
> done...

Why don't you just try it?

(setq bkp-global-map (copy-seq global-map))
  ...
  GO CRAZY
  ...
(setq global-map bkp-global-map)

(Note that I have no idea if it will even work as expected for keymaps;
your backup may still share some structure with the original; not sure.
You might try `copy-tree'.)

Same with other variables.

  Štěpán



reply via email to

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