unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Nathan Trapuzzano <nbtrap@nbtrap.com>
To: Stephen Berman <stephen.berman@gmx.net>
Cc: 15778@debbugs.gnu.org
Subject: bug#15778: 24.3; cperl-mode causes emacs to lock up
Date: Sun, 03 Nov 2013 17:50:41 -0500	[thread overview]
Message-ID: <87li15p0am.fsf@nbtrap.com> (raw)
In-Reply-To: <87y555unuw.fsf@rosalinde.fritz.box> (Stephen Berman's message of "Sun, 03 Nov 2013 23:22:47 +0100")

[-- Attachment #1: Type: text/plain, Size: 203 bytes --]

Stephen Berman <stephen.berman@gmx.net> writes:

> Ah, then it works, i.e. C-k kills the line and Emacs doesn't infloop.

I thought so.

Can someone apply the patch to trunk?  It's attached here again.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: cperl-mode.patch --]
[-- Type: text/x-diff, Size: 1593 bytes --]

From 0b73932e90496e0477eddce6ba7e87d2137cb730 Mon Sep 17 00:00:00 2001
From: Nathan Trapuzzano <nbtrap@nbtrap.com>
Date: Sun, 3 Nov 2013 08:44:36 -0500
Subject: [PATCH] * progmodes/cperl-mode.el
 (cperl-font-lock-fontify-region-function): Don't infloop when expanding
 region over `multiline' syntax-type that begins a line. (Bug#15778)

---
 lisp/ChangeLog               | 7 +++++++
 lisp/progmodes/cperl-mode.el | 5 +++--
 2 files changed, 10 insertions(+), 2 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 6a91465..b047b57 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2013-11-03  Nathan Trapuzzano  <nbtrap@nbtrap.com>
+
+	* progmodes/cperl-mode.el
+	(cperl-font-lock-fontify-region-function): Don't infloop when
+	expanding region over `multiline' syntax-type that begins a line.
+	(Bug#15778)
+
 2013-11-02  Glenn Morris  <rgm@gnu.org>
 
 	* Makefile.in (EMACS): Use a relative filename.
diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el
index 8a7d1e7..36b05c8 100644
--- a/lisp/progmodes/cperl-mode.el
+++ b/lisp/progmodes/cperl-mode.el
@@ -8900,8 +8900,9 @@ do extra unwind via `cperl-unwind-to-safe'."
 		  (beginning-of-line)
 		  (eq (get-text-property (setq beg (point)) 'syntax-type)
 		      'multiline)))
-      (if (setq beg (cperl-beginning-of-property beg 'syntax-type))
-	  (goto-char beg)))
+      (let ((new-beg (cperl-beginning-of-property beg 'syntax-type)))
+	(setq beg (if (= new-beg beg) nil new-beg))
+	(goto-char new-beg)))
     (setq beg (point))
     (goto-char end)
     (while (and end
-- 
1.8.4.2


  reply	other threads:[~2013-11-03 22:50 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-01 11:19 bug#15778: 24.3; cperl-mode causes emacs to lock up Nathan Trapuzzano
2013-11-01 11:46 ` Eli Zaretskii
2013-11-01 12:16   ` Nathan Trapuzzano
2013-11-01 14:41     ` Eli Zaretskii
2013-11-01 14:59       ` Nathan Trapuzzano
2013-11-01 16:26         ` Eli Zaretskii
2013-11-01 17:21           ` Nathan Trapuzzano
2013-11-01 20:23             ` Stephen Berman
2013-11-03  0:00               ` Stephen Berman
2013-11-03 12:00                 ` Nathan Trapuzzano
2013-11-03 13:41                   ` Stephen Berman
2013-11-03 13:59                     ` Nathan Trapuzzano
2013-11-03 19:39                       ` Stephen Berman
2013-11-03 19:48                         ` Nathan Trapuzzano
2013-11-03 22:22                           ` Stephen Berman
2013-11-03 22:50                             ` Nathan Trapuzzano [this message]
2013-11-04  1:48                               ` Stefan Monnier
2013-11-04  2:29                                 ` Nathan Trapuzzano
2013-11-04  3:52                                   ` Stefan Monnier
2013-11-03 14:15                   ` Stefan Monnier
2013-11-03 14:23                     ` Nathan Trapuzzano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87li15p0am.fsf@nbtrap.com \
    --to=nbtrap@nbtrap.com \
    --cc=15778@debbugs.gnu.org \
    --cc=stephen.berman@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).