From: YAMAMOTO Mitsuharu Date: Sun, 1 Aug 2010 16:48:15 +0000 (+0200) Subject: mouse.el: Match "mouse-2" at the beginning of the string. (Bug#6765) X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~438^2~49^2~82 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=26ee77a613915fcf7f73b2976a9b113332652d9a;p=emacs.git mouse.el: Match "mouse-2" at the beginning of the string. (Bug#6765) --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5509b1598a4..18b21843e87 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2010-08-01 YAMAMOTO Mitsuharu + + * 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 * cus-start.el (x-gtk-use-system-tooltips): New variable. diff --git a/lisp/mouse.el b/lisp/mouse.el index b928f636bd5..27587677513 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -879,8 +879,7 @@ at the same position." (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)