From: YAMAMOTO Mitsuharu Date: Thu, 4 Nov 2010 19:27:46 +0000 (-0400) Subject: Backport Bug#6765 fix from trunk. X-Git-Tag: emacs-pretest-23.2.90~21 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=00d9e115db74c5f22b198b430bbdb11378a3b4b8;p=emacs.git 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 --git a/lisp/ChangeLog b/lisp/ChangeLog index 8591e2171f3..5bfe571f031 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-11-01 Glenn Morris * locate.el (locate, locate-mode): Doc fixes. diff --git a/lisp/mouse.el b/lisp/mouse.el index be63f1d73d2..e88c2669714 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -886,8 +886,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)