summaryrefslogtreecommitdiff
path: root/lisp/progmodes
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-01-24 15:10:04 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2011-01-24 15:10:04 -0500
commitab0a61d0acb81353f5636a9c42bec7762dd90c81 (patch)
tree599929ac86b73970c28dca0ce2b3ae35ae8ef83c /lisp/progmodes
parent21bb5ce0dd56f69d661d3d386c1cd3cef12a1d36 (diff)
downloademacs-ab0a61d0acb81353f5636a9c42bec7762dd90c81.tar.gz
emacs-ab0a61d0acb81353f5636a9c42bec7762dd90c81.tar.bz2
emacs-ab0a61d0acb81353f5636a9c42bec7762dd90c81.zip
* 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
Diffstat (limited to 'lisp/progmodes')
-rw-r--r--lisp/progmodes/perl-mode.el6
1 files changed, 4 insertions, 2 deletions
diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el
index 85429ac96af..64cf2c989c2 100644
--- a/lisp/progmodes/perl-mode.el
+++ b/lisp/progmodes/perl-mode.el
@@ -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