# HG changeset patch # User Chong Yidong # Date 1288898866 14400 # Node ID 3c958232fff8a2d6c4c039c7b0acdb8b5c193140 # Parent 57927f4ca5003929b54f52ef20efcd992b461692 Backport Bug#6765 fix from trunk. * mouse.el (mouse-fixup-help-message): Match "mouse-2" only at the beginning of the string. Use `string-match-p'. (Bug#6765) diff -r 57927f4ca500 -r 3c958232fff8 lisp/ChangeLog --- a/lisp/ChangeLog Thu Nov 04 17:00:35 2010 +0100 +++ b/lisp/ChangeLog Thu Nov 04 15:27:46 2010 -0400 @@ -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-11-01 Glenn Morris * locate.el (locate, locate-mode): Doc fixes. diff -r 57927f4ca500 -r 3c958232fff8 lisp/mouse.el --- a/lisp/mouse.el Thu Nov 04 17:00:35 2010 +0100 +++ b/lisp/mouse.el Thu Nov 04 15:27:46 2010 -0400 @@ -886,8 +886,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)