emacs-devel
[Top][All Lists]
Advanced

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

Re: Keymap initialization


From: Stefan Monnier
Subject: Re: Keymap initialization
Date: Mon, 26 Jun 2017 13:41:50 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux)

>> This is anti-idiomatic: Emacs's own code has been making the
>> opposite change over the years in most/all bundled packages.
> I got sick and tired of having to do M-: (makunbound 'foo-map) before
> loading files with changed keymaps.  As a developer yourself, you should
> welcome such changes.

C-M-x on the (defvar foo-map ...) takes care of it as well.  Or using
`defconst` instead of `defvar` would do the trick also (although that's
also less idiomatic).  Or write a new M-x reload-file which causes all
the defvars to be re-evaluated.

>> I consider indispensable, but I really don't see why CC-mode's keymaps
>> need to behave differently from all other major modes.
> They don't.

Obviously they do, which is why you made the change.

> Precisely how these keymaps are constructed and loaded is of
> lesser importance.

It seems important enough for you to change from the idiomatic form to
a non-idiomatic one.

But yes, I do think it's of lesser importance, which is why I think it's
more important that the downsides (e.g. the need to C-M-x or (makunbound
'foo-map), or the need to re-run your .emacs after reloading cc-mode.el,
...) be standardized.

IOW, rather than make CC-mode yet-a-bit-more different from the rest of
Emacs, I wish you would try to find a way to solve your problem globally.
If this annoyance affects you, there's a good chance it affects many
other developers, so finding a general solution would be a lot better.


        Stefan



reply via email to

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