changeset 109605:bdba5a231521

mouse.el: Match "mouse-2" at the beginning of the string. (Bug#6765)
author Juanma Barranquero <lekktu@gmail.com>
date Sun, 01 Aug 2010 18:48:15 +0200
parents 43eca6c9f493
children fa191ba50511
files lisp/ChangeLog lisp/mouse.el
diffstat 2 files changed, 6 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun Aug 01 15:57:07 2010 +0200
+++ b/lisp/ChangeLog	Sun Aug 01 18:48:15 2010 +0200
@@ -1,3 +1,8 @@
+2010-08-01  YAMAMOTO Mitsuharu  <mituharu@math.s.chiba-u.ac.jp>
+
+	* mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the
+	beginning of the string.  Use `string-match-p'.  (Bug#6765)
+
 2010-08-01  Jan Djärv  <jan.h.d@swipnet.se>
 
 	* cus-start.el (x-gtk-use-system-tooltips): New variable.
--- a/lisp/mouse.el	Sun Aug 01 15:57:07 2010 +0200
+++ b/lisp/mouse.el	Sun Aug 01 18:48:15 2010 +0200
@@ -879,8 +879,7 @@
   (let (mp pos)
     (if (and mouse-1-click-follows-link
 	     (stringp msg)
-	     (save-match-data
-	       (string-match "^mouse-2" msg))
+	     (string-match-p "\\`mouse-2" msg)
 	     (setq mp (mouse-pixel-position))
 	     (consp (setq pos (cdr mp)))
 	     (car pos) (>= (car pos) 0)