]> git.eshelyaron.com Git - emacs.git/commitdiff
flymake-diag-region: Fix the recent test breakage
authorDmitry Gutov <dgutov@yandex.ru>
Fri, 18 Dec 2020 02:05:18 +0000 (04:05 +0200)
committerDmitry Gutov <dgutov@yandex.ru>
Fri, 18 Dec 2020 02:05:18 +0000 (04:05 +0200)
* lisp/progmodes/flymake.el (flymake-diag-region):
Make sure to save the match data (bug#29193).

lisp/progmodes/flymake.el

index 6c3e0a1981954656555f973910a73770afe3e35b..da026da86a2755b6ddc53f915c1eed28121b9fda 100644 (file)
@@ -438,7 +438,8 @@ region is invalid."
                   (let* ((beg (progn (forward-char (1- col))
                                      (point)))
                          (sexp-end (or (ignore-errors (end-of-thing 'sexp))
-                                       (ignore-errors (end-of-thing 'symbol))))
+                                       (save-match-data
+                                         (ignore-errors (end-of-thing 'symbol)))))
                          (end (or (and sexp-end
                                        (not (= sexp-end beg))
                                        sexp-end)