[Top][All Lists]

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

Re: ffap bindings suggestion

From: Juri Linkov
Subject: Re: ffap bindings suggestion
Date: Thu, 09 Feb 2006 19:33:48 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> 1. Library ffap.el makes these bindings, among others:
>  (global-set-key [S-mouse-3] 'ffap-at-mouse)
>  (global-set-key [C-S-mouse-3] 'ffap-menu)
> These keys are undefined in vanilla Emacs, so this is not bothersome.
> However, it is common to use mouse-3 for pop-up menus, and alternative,
> related menus might, in some contexts, be appropriate for mouse-3 plus
> modifiers. For example, a library might want to use mouse-3 for one menu,
> S-mouse-3 for a related menu, and C-S-mouse-3 for another related menu.
> Suggestion: Change the ffap bindings to [S-mouse-2] and [C-S-mouse-2].

I agree that it is common to use mouse-3 for pop-up menus, so I think the
old keybinding [C-S-mouse-3] for ffap-menu is more natural than changing
it to [C-S-mouse-2] which is more suitable to follow a link.

> These keys are also undefined in vanilla Emacs. [S-mouse-2] is akin to
> mouse-2 when the latter follows a link (which is essentially what
> `ffap-at-mouse' does), so it feels natural to use.

With recent changes in many modes to use mouse-1 instead of mouse-2
to follow a link, perhaps ffap should use a modifier with mouse-1,
e.g. [C-S-mouse-1].

> I use the mouse-2 bindings suggested here, and I don't mind continuing to
> customize my setup to do so. I just wonder if they might also be better as
> the default bindings.

If there is no available modifier for mouse-1, then I think better default
keybindings are:

  (global-set-key [C-S-mouse-3] 'ffap-menu)
  (global-set-key [C-S-mouse-2] 'ffap-at-mouse)
  (global-set-key [C-S-mouse-1] 'ffap-at-mouse)

> 2. Should variable `ffap-bindings' be a defcustom, so that users can more
> easily customize the bindings? In that case, the library could be modified
> slightly to not require users to put `(ffap-bindings)' in their .emacs:
> simply loading the library would create the (default or customized)
> bindings.
> How do other libraries deal with multiple non-standard bindings?

Many libraries provide a variable which during loading the library
tells it to bind its non-standard bindings if this variable it non-nil.

Juri Linkov

reply via email to

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