[Top][All Lists]

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

Re: Suggestion: Mapping of M-g should be goto-line

From: Miles Bader
Subject: Re: Suggestion: Mapping of M-g should be goto-line
Date: Fri, 26 Mar 2004 19:07:52 -0500
User-agent: Mutt/1.3.28i

On Fri, Mar 26, 2004 at 09:25:49AM -0500, Stefan Monnier wrote:
> It seems people don't understand what I really want to say, so here's
> another take on it:
> 1 - let's create a new command
>    (global-set-key "\C-c\C-c" 'done-editing-now-do-it)
> 2 - let's optimize it away:
>    (global-set-key "\C-c\C-c" 'compile)
>     Notice it's only an optimization that relies on the fact that the
>     binding can trivially be overridden by local maps and on the fact that
>     done-editing-now-do-it did not do anything more than call the
>     done-editing-now-do-it-function function.  The intention is still that
>     major modes (or recursive-edit or minor-modes or whatever else shows up)
>     should rebind it to something more appropriate if applicable.

I intensely dislike this sort of `ah modes can just rebind the key' way of
avoiding a level of indirection, because often I use different global
bindings that normal -- and in that case, with a variable used for
configuring things, everything works great, but if modes `override by
rebinding', then I end up having to have my own personal special cases for
every single mode that wants to do this.

A good example is `fill-paragraph-function': I _love_ this, because I use a
non-standard binding for `fill-paragaraph'; in the bad-old-days, when many
modes with paragraph-filling support would just rebind `M-q' (or whatever the
standard binding for fill-paragraph is -- I can't remember!), it was a
nightmare, but now that most instead just set fill-paragraph-function, I have
no problems at all, everything works swimmingly.

[I've always wished for a level of indirection _built into keymaps_ --
e.g. standard global bindings could be named, and then locally overridden by
name in modes.]

Freedom's just another word, for nothing left to lose   --Janis Joplin

reply via email to

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