mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-03 02:31:03 -08:00
* 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 <andreyk.mad@gmail.com>
This commit is contained in:
parent
423b6b6229
commit
e8f5657bc7
1 changed files with 5 additions and 2 deletions
|
|
@ -178,13 +178,16 @@
|
||||||
|
|
||||||
(defun lisp--match-hidden-arg (limit)
|
(defun lisp--match-hidden-arg (limit)
|
||||||
(let ((res nil))
|
(let ((res nil))
|
||||||
|
(forward-line 0)
|
||||||
(while
|
(while
|
||||||
(let ((ppss (parse-partial-sexp (line-beginning-position)
|
(let ((ppss (parse-partial-sexp (point)
|
||||||
(line-end-position)
|
(line-end-position)
|
||||||
-1)))
|
-1)))
|
||||||
(skip-syntax-forward " )")
|
(skip-syntax-forward " )")
|
||||||
(if (or (>= (car ppss) 0)
|
(if (or (>= (car ppss) 0)
|
||||||
(looking-at ";\\|$"))
|
(eolp)
|
||||||
|
(looking-at ";")
|
||||||
|
(nth 8 (syntax-ppss))) ;Within a string or comment.
|
||||||
(progn
|
(progn
|
||||||
(forward-line 1)
|
(forward-line 1)
|
||||||
(< (point) limit))
|
(< (point) limit))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue