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

Re: key remapping


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,

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---
 (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---