From: Stefan Monnier Date: Sat, 7 Nov 2020 15:15:22 +0000 (-0500) Subject: * lisp/emacs-lisp/lisp-mode.el: Avoid false-positive "hidden arg" in strings X-Git-Tag: emacs-28.0.90~5214^2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e8f5657bc7f6e0e45f70e4849736c6e87d44a1ac;p=emacs.git * lisp/emacs-lisp/lisp-mode.el: Avoid false-positive "hidden arg" in strings (lisp--match-hidden-arg): Don't misfire in strings and comments. Reported by: Andrii Kolomoiets --- diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 268992295bf..daf49670894 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -178,13 +178,16 @@ (defun lisp--match-hidden-arg (limit) (let ((res nil)) + (forward-line 0) (while - (let ((ppss (parse-partial-sexp (line-beginning-position) + (let ((ppss (parse-partial-sexp (point) (line-end-position) -1))) (skip-syntax-forward " )") (if (or (>= (car ppss) 0) - (looking-at ";\\|$")) + (eolp) + (looking-at ";") + (nth 8 (syntax-ppss))) ;Within a string or comment. (progn (forward-line 1) (< (point) limit))