From unknown Sat Aug 16 21:59:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11739: 24.1; font-lock (highlighting) bug with dollar+quote sequence ('...$') Resent-From: Vincent Lefevre Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jun 2012 10:28:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11739 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11739@debbugs.gnu.org X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.13401016492405 (code B ref -1); Tue, 19 Jun 2012 10:28:02 +0000 Received: (at submit) by debbugs.gnu.org; 19 Jun 2012 10:27:29 +0000 Received: from localhost ([127.0.0.1]:47974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sgvej-0000cj-5H for submit@debbugs.gnu.org; Tue, 19 Jun 2012 06:27:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50669) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sgvef-0000cb-NY for submit@debbugs.gnu.org; Tue, 19 Jun 2012 06:27:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgvbP-000396-6G for submit@debbugs.gnu.org; Tue, 19 Jun 2012 06:24:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:36838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgvbP-00038z-3K for submit@debbugs.gnu.org; Tue, 19 Jun 2012 06:24:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgvbN-0002SU-4O for bug-gnu-emacs@gnu.org; Tue, 19 Jun 2012 06:24:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgvbG-00036l-DH for bug-gnu-emacs@gnu.org; Tue, 19 Jun 2012 06:24:00 -0400 Received: from ypig.lip.ens-lyon.fr ([140.77.13.48]:46479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgvbG-00036P-6Z for bug-gnu-emacs@gnu.org; Tue, 19 Jun 2012 06:23:54 -0400 Received: from vlefevre by ypig.lip.ens-lyon.fr with local (Exim 4.80) (envelope-from ) id 1SgvbE-0003Xj-1p; Tue, 19 Jun 2012 12:23:52 +0200 From: Vincent Lefevre Date: Tue, 19 Jun 2012 12:23:51 +0200 Message-ID: <87d34vwqfc.fsf@ypig.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Open the following file with "emacs -Q ": ------------------------------------------------------------ #!/usr/bin/env perl # -*- mode: cperl -*- $foo = 'blah $ ' and print "$foo\n"; # OK $foo = 'blah $' and print "$foo\n"; # Incorrectly highlighted ------------------------------------------------------------ The first "and print ..." line is correctly highlighted, but not the second one. It seems that CPerl is confused by a $ at the end of a single-quote string literal. This is a regression: GNU Emacs 23.4.1 from Debian does not have this problem. In GNU Emacs 24.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2012-06-15 on ypig Windowing system distributor `The X.Org Foundation', version 11.0.11201902 Configured using: `configure '--prefix=/usr/local/emacs-24.1' '--enable-asserts'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: POSIX value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: en_DK value of $LANG: POSIX value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: display-time-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r t - b u Recent messages: Loading /home/vlefevre/share/emacs/site-lisp/mutteditor.el (source)...done Loading time...done For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr warnings emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu view time cus-start cus-load paren cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) From unknown Sat Aug 16 21:59:36 2025 X-Loop: help-debbugs@gnu.org Subject: bug#11739: 24.1; font-lock (highlighting) bug with dollar+quote sequence ('...$') Resent-From: Vincent Lefevre Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 19 Jun 2012 13:19:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11739 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: To: 11739@debbugs.gnu.org Received: via spool by 11739-submit@debbugs.gnu.org id=B11739.134011193920688 (code B ref 11739); Tue, 19 Jun 2012 13:19:02 +0000 Received: (at 11739) by debbugs.gnu.org; 19 Jun 2012 13:18:59 +0000 Received: from localhost ([127.0.0.1]:48234 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SgyKb-0005NX-UF for submit@debbugs.gnu.org; Tue, 19 Jun 2012 09:18:58 -0400 Received: from vinc17.pck.nerim.net ([213.41.242.187]:50453 helo=smtp-xvii.vinc17.net) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SgyKU-0005NJ-Tu for 11739@debbugs.gnu.org; Tue, 19 Jun 2012 09:18:52 -0400 Received: by xvii.vinc17.org (Postfix, from userid 1000) id 07F3D34C01B; Tue, 19 Jun 2012 15:15:23 +0200 (CEST) Date: Tue, 19 Jun 2012 15:15:23 +0200 From: Vincent Lefevre Message-ID: <20120619131523.GA17701@xvii.vinc17.org> References: <87d34vwqfc.fsf@ypig.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline In-Reply-To: <87d34vwqfc.fsf@ypig.lip.ens-lyon.fr> X-Mailer-Info: http://www.vinc17.net/mutt/ User-Agent: Mutt/1.5.21-6205-vl-r52214 (2012-05-24) Content-Transfer-Encoding: quoted-printable X-Spam-Score: -1.9 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -1.9 (-) On 2012-06-19 12:23:51 +0200, Vincent Lefevre wrote: > Open the following file with "emacs -Q ": >=20 > ------------------------------------------------------------ > #!/usr/bin/env perl > # -*- mode: cperl -*- >=20 > $foo =3D 'blah $ ' > and print "$foo\n"; # OK >=20 > $foo =3D 'blah $' > and print "$foo\n"; # Incorrectly highlighted > ------------------------------------------------------------ >=20 > The first "and print ..." line is correctly highlighted, but not the > second one. It seems that CPerl is confused by a $ at the end of a > single-quote string literal. The problem is due to this change in cperl-mode.el: @@ -1832,7 +1832,13 @@ (make-local-variable 'cperl-syntax-state) (setq cperl-syntax-state nil) ; reset syntaxification c= ache (if cperl-use-syntax-table-text-property - (progn + (if (boundp 'syntax-propertize-function) + (progn + ;; Reset syntaxification cache. + (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)))) (make-local-variable 'parse-sexp-lookup-properties) ;; Do not introduce variable if not needed, we check it! (set 'parse-sexp-lookup-properties t) --=20 Vincent Lef=E8vre - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) From unknown Sat Aug 16 21:59:36 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.428 (Entity 5.428) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Vincent Lefevre Subject: bug#11739: closed (Re: bug#11739: 24.1; font-lock (highlighting) bug with dollar+quote sequence ('...$')) Message-ID: References: <87d34vwqfc.fsf@ypig.lip.ens-lyon.fr> X-Gnu-PR-Message: they-closed 11739 X-Gnu-PR-Package: emacs Reply-To: 11739@debbugs.gnu.org Date: Thu, 21 Jun 2012 16:57:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1340297822-1759-1" This is a multi-part message in MIME format... ------------=_1340297822-1759-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #11739: 24.1; cperl font-lock (highlighting) bug with dollar+quote sequence= ('...$') which was filed against the emacs package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 11739@debbugs.gnu.org. --=20 11739: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D11739 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1340297822-1759-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 11739-done) by debbugs.gnu.org; 21 Jun 2012 16:56:30 +0000 Received: from localhost ([127.0.0.1]:51868 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ShkgI-0000RY-4Z for submit@debbugs.gnu.org; Thu, 21 Jun 2012 12:56:30 -0400 Received: from pruche.dit.umontreal.ca ([132.204.246.22]:37583) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1ShkgG-0000RR-Fb for 11739-done@debbugs.gnu.org; Thu, 21 Jun 2012 12:56:29 -0400 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 q5LGqsPt023784; Thu, 21 Jun 2012 12:52:54 -0400 Received: by faina.iro.umontreal.ca (Postfix, from userid 20848) id ABDB5B422C; Thu, 21 Jun 2012 12:52:53 -0400 (EDT) From: Stefan Monnier To: Vincent Lefevre Subject: Re: bug#11739: 24.1; font-lock (highlighting) bug with dollar+quote sequence ('...$') Message-ID: References: <87d34vwqfc.fsf@ypig.lip.ens-lyon.fr> Date: Thu, 21 Jun 2012 12:52:52 -0400 In-Reply-To: <87d34vwqfc.fsf@ypig.lip.ens-lyon.fr> (Vincent Lefevre's message of "Tue, 19 Jun 2012 12:23:51 +0200") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4257=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4257> : streams <771584> : uri <1145522> X-Spam-Score: -3.5 (---) X-Debbugs-Envelope-To: 11739-done Cc: 11739-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -3.5 (---) > The first "and print ..." line is correctly highlighted, but not the > second one. It seems that CPerl is confused by a $ at the end of a > single-quote string literal. Actually, cperl recognizes these just fine, but there was some miscommunication between cperl and syntax-propertize so one ended up removing something expecting the other would refresh it, but without telling it. It should be fixed now on the emacs-24 branch. Stefan --- lisp/progmodes/cperl-mode.el 2012-01-19 07:21:25 +0000 +++ lisp/progmodes/cperl-mode.el 2012-06-21 16:41:01 +0000 @@ -8951,11 +8951,12 @@ (setq cperl-syntax-done-to (min cperl-syntax-done-to beg)))) (defun cperl-update-syntaxification (from to) - (if (and cperl-use-syntax-table-text-property - cperl-syntaxify-by-font-lock + (cond + ((not cperl-use-syntax-table-text-property) nil) + ((fboundp 'syntax-propertize) (syntax-propertize to)) + ((and cperl-syntaxify-by-font-lock (or (null cperl-syntax-done-to) (< cperl-syntax-done-to to))) - (progn (save-excursion (goto-char from) (cperl-fontify-syntaxically to))))) ------------=_1340297822-1759-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 19 Jun 2012 10:27:29 +0000 Received: from localhost ([127.0.0.1]:47974 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sgvej-0000cj-5H for submit@debbugs.gnu.org; Tue, 19 Jun 2012 06:27:29 -0400 Received: from eggs.gnu.org ([208.118.235.92]:50669) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Sgvef-0000cb-NY for submit@debbugs.gnu.org; Tue, 19 Jun 2012 06:27:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgvbP-000396-6G for submit@debbugs.gnu.org; Tue, 19 Jun 2012 06:24:04 -0400 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=unavailable version=3.3.2 Received: from lists.gnu.org ([208.118.235.17]:36838) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgvbP-00038z-3K for submit@debbugs.gnu.org; Tue, 19 Jun 2012 06:24:03 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49652) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgvbN-0002SU-4O for bug-gnu-emacs@gnu.org; Tue, 19 Jun 2012 06:24:02 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SgvbG-00036l-DH for bug-gnu-emacs@gnu.org; Tue, 19 Jun 2012 06:24:00 -0400 Received: from ypig.lip.ens-lyon.fr ([140.77.13.48]:46479) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SgvbG-00036P-6Z for bug-gnu-emacs@gnu.org; Tue, 19 Jun 2012 06:23:54 -0400 Received: from vlefevre by ypig.lip.ens-lyon.fr with local (Exim 4.80) (envelope-from ) id 1SgvbE-0003Xj-1p; Tue, 19 Jun 2012 12:23:52 +0200 From: Vincent Lefevre To: bug-gnu-emacs@gnu.org Subject: 24.1; font-lock (highlighting) bug with dollar+quote sequence ('...$') Date: Tue, 19 Jun 2012 12:23:51 +0200 Message-ID: <87d34vwqfc.fsf@ypig.lip.ens-lyon.fr> MIME-Version: 1.0 Content-Type: text/plain X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 208.118.235.17 X-Spam-Score: -6.9 (------) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: debbugs-submit-bounces@debbugs.gnu.org Errors-To: debbugs-submit-bounces@debbugs.gnu.org X-Spam-Score: -6.9 (------) Open the following file with "emacs -Q ": ------------------------------------------------------------ #!/usr/bin/env perl # -*- mode: cperl -*- $foo = 'blah $ ' and print "$foo\n"; # OK $foo = 'blah $' and print "$foo\n"; # Incorrectly highlighted ------------------------------------------------------------ The first "and print ..." line is correctly highlighted, but not the second one. It seems that CPerl is confused by a $ at the end of a single-quote string literal. This is a regression: GNU Emacs 23.4.1 from Debian does not have this problem. In GNU Emacs 24.1.1 (x86_64-unknown-linux-gnu, GTK+ Version 2.24.10) of 2012-06-15 on ypig Windowing system distributor `The X.Org Foundation', version 11.0.11201902 Configured using: `configure '--prefix=/usr/local/emacs-24.1' '--enable-asserts'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: POSIX value of $LC_CTYPE: en_US.UTF-8 value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: en_DK value of $LANG: POSIX value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default enable-multibyte-characters: t Major mode: Lisp Interaction Minor modes in effect: display-time-mode: t show-paren-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: x r e p o r t - b u Recent messages: Loading /home/vlefevre/share/emacs/site-lisp/mutteditor.el (source)...done Loading time...done For information about GNU Emacs and the GNU system, type C-h C-a. Making completion list... Load-path shadows: None found. Features: (shadow sort gnus-util mail-extr warnings emacsbug message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 mailabbrev gmm-utils mailheader sendmail rfc2047 rfc2045 ietf-drums mm-util mail-prsvr mail-utils help-mode easymenu view time cus-start cus-load paren cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock syntax facemenu font-core frame cham georgian utf-8-lang misc-lang vietnamese tibetan thai tai-viet lao korean japanese hebrew greek romanian slovak czech european ethiopic indian cyrillic chinese case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs button faces cus-face files text-properties overlay sha1 md5 base64 format env code-pages mule custom widget hashtable-print-readable backquote make-network-process dbusbind dynamic-setting system-font-setting font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs) ------------=_1340297822-1759-1--