1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

* lisp/progmodes/perl-mode.el (perl-syntax-propertize-special-constructs):

Don't move backward, so as not to fall in an inf-loop.

Fixes: debbugs:7736
This commit is contained in:
Stefan Monnier 2011-01-24 15:10:04 -05:00
parent 21bb5ce0dd
commit ab0a61d0ac
2 changed files with 7 additions and 2 deletions

View file

@ -360,7 +360,8 @@ The expansion is entirely correct because it uses the C preprocessor."
(t
;; This is regexp like quote thingy.
(setq char (char-after (nth 8 state)))
(let ((twoargs (save-excursion
(let ((startpos (point))
(twoargs (save-excursion
(goto-char (nth 8 state))
(skip-syntax-backward " ")
(skip-syntax-backward "w")
@ -384,7 +385,8 @@ The expansion is entirely correct because it uses the C preprocessor."
(goto-char (1+ (nth 8 state)))
(up-list 1)
t)
(scan-error nil))
;; In case of error, make sure we don't move backward.
(scan-error (goto-char startpos) nil))
(not (or (nth 8 (parse-partial-sexp
(point) limit nil nil state 'syntax-table))
;; If we have a self-paired opener and a twoargs