bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#11966: 24.1; cperl-mode with evil-mode causes hang on syntax-propert


From: Stefan Monnier
Subject: bug#11966: 24.1; cperl-mode with evil-mode causes hang on syntax-propertize
Date: Wed, 18 Jul 2012 05:35:23 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux)

Version:24.2

> Emacs hangs on the creation of a newline with evil-ret when in a cperl
> buffer with some POD documentation after the __END__. This doesn't
> appear to be a bug in evil, but instead a bug in cperl or
> syntax-propertize,

Indeed, I could reproduce it without evil.  It seems to be a bug in
cperl-mode, tho maybe it can only be triggered via syntax-propertize.
In any case, I've installed the patch below into the emacs-24 branch,
and that should fix it.  Thanks you,


        Stefan


=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog      2012-07-09 13:54:50 +0000
+++ lisp/ChangeLog      2012-07-18 09:32:41 +0000
@@ -1,3 +1,8 @@
+2012-07-18  Stefan Monnier  <address@hidden>
+
+       * progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
+       of narrowed buffer (bug#11966).
+
 2012-07-09  Stefan Monnier  <address@hidden>
 
        * progmodes/sh-script.el (sh-syntax-propertize-function): Fix last

=== modified file 'lisp/progmodes/cperl-mode.el'
--- lisp/progmodes/cperl-mode.el        2012-06-21 16:49:21 +0000
+++ lisp/progmodes/cperl-mode.el        2012-07-18 09:31:14 +0000
@@ -3498,7 +3498,8 @@
     (if end
        ;; Do the same for end, going small steps
        (save-excursion
-         (while (and end (get-text-property end 'syntax-type))
+         (while (and end (< end (point-max))
+                     (get-text-property end 'syntax-type))
            (setq pos end
                  end (next-single-property-change end 'syntax-type nil 
(point-max)))
            (if end (progn (goto-char end)






reply via email to

[Prev in Thread] Current Thread [Next in Thread]