[Top][All Lists]

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

Re: Binding mouse-3 to browse-url-at-point question

From: David Kastrup
Subject: Re: Binding mouse-3 to browse-url-at-point question
Date: 10 Sep 2002 18:26:58 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50

"Jeff Rancier" <address@hidden> writes:

> Hello.
> I easily enough bound it, via the following in my .emacs:
> (global-set-key [(mouse-3)] 'browse-url-at-point)
> The problem is that the point doesn't change to the line I mouse-3 click on
> before I browse-url-at-point().  Of course I can click mouse-1, then
> mouse-3, to acheive this, but I'd rather have mouse-3 move the point then
> browse.
> I did C-h k on mouse-1 and got:  mouse-drag-region (which first moves the
> point), so I naively tried:
> (global-set-key [(mouse-3)]
>   (lambda()
>     progn
>     'mouse-drag-region
>     'browse-url-at-point))
> But got:
> recursive-edit: Wrong type argument: commandp, (lambda nil progn (quote
> mouse-drag-region) (quote browse-url-at-point))
> Can anyone help me fix this up a bit?

Commands bound to keys have to start with an (interactive ...) form.
Take a look at C-h f interactive RET, a particular letter argument
tells the keybinding that it should first move the point to the
clicked position...

David Kastrup, Kriemhildstr. 15, 44793 Bochum
Email: address@hidden

reply via email to

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