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

Mouse-1 clicks in Emacs 22



Hi,

This patch adds support for mouse-1 clicks to follow links under Emacs
22.  Most modes now support it and it is quite convenient!
Since we're in feature freeze, this is probably not suitable for the
release branch.

Apologies for the possible fuzziness of this patch, I have local changes
in my repository.

Thanks,

-- 
Romain Francoise <romain@orebokech.com> | And you never lay down and
it's a miracle -- http://orebokech.com/ | you never stay home...

Index: w3m.el
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/w3m.el,v
retrieving revision 1.1100
diff -u -r1.1100 w3m.el
--- w3m.el	21 Feb 2005 12:31:13 -0000	1.1100
+++ w3m.el	23 Feb 2005 17:57:14 -0000
@@ -6213,6 +6216,8 @@
 	  (define-key map [(shift button2)]
 	    'w3m-mouse-view-this-url-new-session))
       (define-key map [mouse-2] 'w3m-mouse-view-this-url)
+      ;; Support for mouse-1 on Emacs 22.
+      (define-key map [follow-link] 'mouse-face)
       (define-key map [S-mouse-2] 'w3m-mouse-view-this-url-new-session))
     (define-key map "\C-c\C-@" 'w3m-history-store-position)
     (if (featurep 'xemacs)
@@ -6313,6 +6318,8 @@
 	  (define-key map [(shift button2)]
 	    'w3m-mouse-view-this-url-new-session))
       (define-key map [mouse-2] 'w3m-mouse-view-this-url)
+      ;; Support for mouse-1 on Emacs 22.
+      (define-key map [follow-link] 'mouse-face)
       (define-key map [S-mouse-2] 'w3m-mouse-view-this-url-new-session))
     (define-key map "\C-c\C-@" 'w3m-history-store-position)
     (define-key map [?\C-c?\C- ] 'w3m-history-store-position)
Index: doc/emacs-w3m.texi
===================================================================
RCS file: /storage/cvsroot/emacs-w3m/doc/emacs-w3m.texi,v
retrieving revision 1.234
diff -u -r1.234 emacs-w3m.texi
--- doc/emacs-w3m.texi	23 Feb 2005 14:34:45 -0000	1.234
+++ doc/emacs-w3m.texi	23 Feb 2005 17:57:15 -0000
@@ -1047,8 +1047,10 @@
 use modifier keys since the emacs-w3m developers are all Emacs
 otaku@dots{}
 
-Use @kbd{mouse-2} for the ``following a link'' operation which the first
-basic of web browsing.
+Use @kbd{mouse-2} to ``follow links'' (the first basic of web browsing).
+Under Emacs 22.1 and newer, you can also follow links using
+@kbd{mouse-1}, depending of the value of
+@code{mouse-1-click-follows-link}.
 
 @table @kbd
 @item mouse-2