2011-01-24 Stefan Monnier <monnier@iro.umontreal.ca>
+ * progmodes/perl-mode.el (perl-syntax-propertize-special-constructs):
+ Don't move backward, so as not to fall in an inf-loop (bug#7736).
+
* progmodes/ruby-mode.el (ruby-syntax-propertize-function): (bug#7735)
Handle ?" and friends differently (e.g. don't use backrefs).
(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")
(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