From 00d9e115db74c5f22b198b430bbdb11378a3b4b8 Mon Sep 17 00:00:00 2001 From: YAMAMOTO Mitsuharu Date: Thu, 4 Nov 2010 15:27:46 -0400 Subject: [PATCH] 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) --- lisp/ChangeLog | 5 +++++ lisp/mouse.el | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) 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) -- 2.39.2