From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: David Kastrup Newsgroups: gmane.emacs.help Subject: Re: Binding mouse-3 to browse-url-at-point question Date: 10 Sep 2002 18:26:58 +0200 Organization: T-Online Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031675768 32019 127.0.0.1 (10 Sep 2002 16:36:08 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 10 Sep 2002 16:36:08 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17onzh-0008Jt-00 for ; Tue, 10 Sep 2002 18:36:05 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17onzl-0007VG-00; Tue, 10 Sep 2002 12:36:09 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!canoe.uoregon.edu!logbridge.uoregon.edu!newshunter!cosy.sbg.ac.at!newsrouter.chello.at!newsfeed01.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail Original-Newsgroups: comp.emacs,gnu.emacs.help Original-Lines: 37 Original-X-Trace: news.t-online.com 1031675220 07 3993 XJ1tbA+SvAXUK 020910 16:27:00 Original-X-Complaints-To: abuse@t-online.com X-Sender: 520018396234-0001@t-dialin.net X-Face: 2FEFf>]>q>2iw=B6,xrUubRI>pR&Ml9=ao@P@i)L:\urd*t9M~y1^:+Y]'C0~{mAl`oQuAl \!3KEIp?*w`|bL5qr,H)LFO6Q=qx~iH4DN;i";/yuIsqbLLCh/!U#X[S~(5eZ41to5f%E@'ELIi$t^ Vc\LWP@J5p^rst0+('>Er0=^1{]M9!p?&:\z]|;&=NP3AhB!B_bi^]Pfkw User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 Original-Xref: nntp.stanford.edu comp.emacs:74349 gnu.emacs.help:104683 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1239 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1239 "Jeff Rancier" 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: David.Kastrup@t-online.de