From: Dmitry Gutov Date: Wed, 16 Dec 2020 00:49:35 +0000 (+0200) Subject: (flymake-diag-region): Fall back to (end-of-thing 'symbol) X-Git-Tag: emacs-28.0.90~4688 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=fda9a2bbfd3adcce046c03bee72ba848c61a3e29;p=emacs.git (flymake-diag-region): Fall back to (end-of-thing 'symbol) * lisp/progmodes/flymake.el (flymake-diag-region): Fall back to (end-of-thing 'symbol) (bug#29193). --- diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el index efa7b2ffbf1..6c3e0a19819 100644 --- a/lisp/progmodes/flymake.el +++ b/lisp/progmodes/flymake.el @@ -437,7 +437,8 @@ region is invalid." (if (and col (cl-plusp col)) (let* ((beg (progn (forward-char (1- col)) (point))) - (sexp-end (ignore-errors (end-of-thing 'sexp))) + (sexp-end (or (ignore-errors (end-of-thing 'sexp)) + (ignore-errors (end-of-thing 'symbol)))) (end (or (and sexp-end (not (= sexp-end beg)) sexp-end)