From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#10095: 24.0.50; cperl-mode highlight bug Date: Mon, 06 Aug 2012 13:41:52 -0400 Message-ID: References: <20120711115906.GA15586@xvii.vinc17.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1344274941 15048 80.91.229.3 (6 Aug 2012 17:42:21 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 6 Aug 2012 17:42:21 +0000 (UTC) Cc: wd , 10095-done@debbugs.gnu.org To: Vincent Lefevre Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Aug 06 19:42:21 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SyRJn-00035U-87 for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Aug 2012 19:42:15 +0200 Original-Received: from localhost ([::1]:37844 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyRJm-0004RK-8m for geb-bug-gnu-emacs@m.gmane.org; Mon, 06 Aug 2012 13:42:14 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:60947) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyRJi-0004R9-71 for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2012 13:42:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SyRJh-0005ga-4w for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2012 13:42:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56553) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SyRJh-0005gS-1A for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2012 13:42:09 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SyRRK-00037g-KQ for bug-gnu-emacs@gnu.org; Mon, 06 Aug 2012 13:50:02 -0400 Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Mon, 06 Aug 2012 17:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 10095 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Mail-Followup-To: 10095@debbugs.gnu.org, monnier@IRO.UMontreal.CA Original-Received: via spool by 10095-done@debbugs.gnu.org id=D10095.134427538811980 (code D ref 10095); Mon, 06 Aug 2012 17:50:02 +0000 Original-Received: (at 10095-done) by debbugs.gnu.org; 6 Aug 2012 17:49:48 +0000 Original-Received: from localhost ([127.0.0.1]:37864 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyRR6-00037A-25 for submit@debbugs.gnu.org; Mon, 06 Aug 2012 13:49:48 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:53475) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SyRR4-000373-RV for 10095-done@debbugs.gnu.org; Mon, 06 Aug 2012 13:49:47 -0400 Original-Received: from faina.iro.umontreal.ca (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q76Hfqku020212; Mon, 6 Aug 2012 13:41:52 -0400 Original-Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id 489FAB41E3; Mon, 6 Aug 2012 13:41:52 -0400 (EDT) In-Reply-To: (Stefan Monnier's message of "Mon, 06 Aug 2012 11:48:38 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4302=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4302> : streams <795401> : uri <1185376> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62877 Archived-At: Version: 24.2 >> It still exists in GNU Emacs 24.1.1. I actually noticed the problem >> on the following code, and I believe it's the same bug. It seems >> that CPerl doesn't detect the end of a long qq or qw. > Thanks for the test case, I can reproduce it here with the trunk, so > it's not yet fixed. I've just installed the patch below in the `emacs-24' branch. I believe it fixes your problem. Thanks for the good test case, Stefan === modified file 'lisp/progmodes/cperl-mode.el' --- lisp/progmodes/cperl-mode.el 2012-07-18 09:33:09 +0000 +++ lisp/progmodes/cperl-mode.el 2012-08-06 17:20:25 +0000 @@ -1838,7 +1838,13 @@ (set (make-local-variable 'cperl-syntax-done-to) nil) (set (make-local-variable 'syntax-propertize-function) (lambda (start end) - (goto-char start) (cperl-fontify-syntaxically end)))) + (goto-char start) + ;; Even if cperl-fontify-syntaxically has already gone + ;; beyond `start', syntax-propertize has just removed + ;; syntax-table properties between start and end, so we have + ;; to re-apply them. + (setq cperl-syntax-done-to start) + (cperl-fontify-syntaxically end)))) (make-local-variable 'parse-sexp-lookup-properties) ;; Do not introduce variable if not needed, we check it! (set 'parse-sexp-lookup-properties t)