[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: key remapping
- From: Michael Heerdegen <michael_heerdegen@xxxxxx>
- Date: Thu, 20 Mar 2014 15:12:06 +0100
- X-ml-name: emacs-w3m
- X-mail-count: 12297
- References: <53297D9D.4060505@xxxxxxxxxxxxxxxxxxx> <b4m1txxsu9z.fsf@xxxxxxx> <532AECE9.20504@xxxxxxxxxxxxxxxxxxx>
Hi,
let me first say that you might regret redefining mouse keys this
way. mouse-2 following links is a principle in the whole of Emacs (Info,
dired, ...) You might not want to have inconsistent bindings in
different modes. BTW, to be honest, I don't like this behavior much,
too.
In w3m, the standard binding for opening a session in the background is
shift mouse-2.
If you nonetheless want what you described, I'd do it like this:
--8<---------------cut here---------------start------------->8---
(add-hook
'w3m-mode-hook
(lambda ()
(setq w3m-new-session-in-background t)
(setq-local mouse-1-click-follows-link nil)
(local-set-key [mouse-1] #'w3m-mouse-view-this-url)
(local-set-key [mouse-2] #'w3m-mouse-view-this-url-new-session)))
--8<---------------cut here---------------end--------------->8---
Michael.