GNU bug report logs - #11966
24.1; cperl-mode with evil-mode causes hang on syntax-propertize

Previous Next

Package: emacs;

Reported by: JC Petkovich <jcpetkovich <at> gmail.com>

Date: Tue, 17 Jul 2012 21:30:01 UTC

Severity: normal

Found in version 24.1

Fixed in version 24.2

Done: Stefan Monnier <monnier <at> IRO.UMontreal.CA>

Bug is archived. No further changes may be made.

Full log


Message #16 received at 11966-done <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: JC Petkovich <jcpetkovich <at> gmail.com>
Cc: 11966-done <at> debbugs.gnu.org, Ilya Zakharevich <ilyaz <at> cpan.org>
Subject: Re: bug#11966: 24.1;
	cperl-mode with evil-mode causes hang on syntax-propertize
Date: Wed, 18 Jul 2012 05:35:23 -0400
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  <monnier <at> iro.umontreal.ca>
+
+	* progmodes/cperl-mode.el (cperl-unwind-to-safe): Don't inf-loop at end
+	of narrowed buffer (bug#11966).
+
 2012-07-09  Stefan Monnier  <monnier <at> iro.umontreal.ca>
 
 	* 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)





This bug report was last modified 13 years and 24 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.