From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Gottschalk Newsgroups: gmane.emacs.bugs Subject: bug#12373: 24.1; cperl-mode syntax highlighting Date: Thu, 6 Sep 2012 09:49:44 -0700 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1346952063 11013 80.91.229.3 (6 Sep 2012 17:21:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 6 Sep 2012 17:21:03 +0000 (UTC) To: 12373@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Sep 06 19:21:05 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 1T9flI-0001fg-Ud for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Sep 2012 19:21:05 +0200 Original-Received: from localhost ([::1]:60714 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9flF-0006Ej-TU for geb-bug-gnu-emacs@m.gmane.org; Thu, 06 Sep 2012 13:21:01 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39278) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9fl6-00069Z-Sq for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:20:59 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9fl3-00057J-RI for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:20:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:35020) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9fl3-00057E-I7 for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:20:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1T9flG-0001ug-Ef for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:21:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Gottschalk Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 06 Sep 2012 17:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 12373 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Original-Received: via spool by submit@debbugs.gnu.org id=B.13469520327251 (code B ref -1); Thu, 06 Sep 2012 17:21:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 6 Sep 2012 17:20:32 +0000 Original-Received: from localhost ([127.0.0.1]:44552 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9fkk-0001sr-91 for submit@debbugs.gnu.org; Thu, 06 Sep 2012 13:20:32 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:58039) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1T9fam-0001YZ-QP for submit@debbugs.gnu.org; Thu, 06 Sep 2012 13:10:15 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9faT-0000av-O5 for submit@debbugs.gnu.org; Thu, 06 Sep 2012 13:09:59 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:35463) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9faT-0000ar-L0 for submit@debbugs.gnu.org; Thu, 06 Sep 2012 13:09:53 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43052) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9faR-0001xt-Ml for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:09:53 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T9faP-0000aL-D1 for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:09:51 -0400 Original-Received: from hqemgate03.nvidia.com ([216.228.121.140]:18272) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T9faO-0000Zk-VM for bug-gnu-emacs@gnu.org; Thu, 06 Sep 2012 13:09:49 -0400 Original-Received: from hqnvupgp08.nvidia.com (Not Verified[216.228.121.13]) by hqemgate03.nvidia.com id ; Thu, 06 Sep 2012 09:51:15 -0700 Original-Received: from hqemhub03.nvidia.com ([172.17.108.22]) by hqnvupgp08.nvidia.com (PGP Universal service); Thu, 06 Sep 2012 09:49:45 -0700 X-PGP-Universal: processed; by hqnvupgp08.nvidia.com on Thu, 06 Sep 2012 09:49:45 -0700 Original-Received: from hqnvemgw02.nvidia.com (172.16.227.111) by HQEMHUB03.nvidia.com (172.20.150.15) with Microsoft SMTP Server id 8.3.264.0; Thu, 6 Sep 2012 09:49:44 -0700 Original-Received: from daphne.nvidia.com (Not Verified[172.16.212.96]) by hqnvemgw02.nvidia.com with MailMarshal (v6,7,2,8378) id ; Thu, 06 Sep 2012 09:50:26 -0700 Original-Received: from sc-xterm-12.nvidia.com (sc-xterm-12.nvidia.com [172.20.233.72]) by daphne.nvidia.com (8.13.8+Sun/8.8.8) with ESMTP id q86GniWK025636 for ; Thu, 6 Sep 2012 09:49:44 -0700 (PDT) Original-Received: from sc-xterm-12.nvidia.com (localhost [127.0.0.1]) by sc-xterm-12.nvidia.com (8.13.1/8.12.11) with ESMTP id q86Gni9v022478 for ; Thu, 6 Sep 2012 09:49:44 -0700 Original-Received: (from sgottschalk@localhost) by sc-xterm-12.nvidia.com (8.13.1/8.13.1/Submit) id q86Gni8A022475; Thu, 6 Sep 2012 09:49:44 -0700 X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP4, XP SP1+ X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Thu, 06 Sep 2012 13:20:28 -0400 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:63867 Archived-At: Hello, This is a bug report for cperl-mode major mode. I'm sorry, I do not know how to contact the author of this major mode. First of all, I think cperl-mode is wonderful, so please don't think I'm ungrateful for it. I'm having a problem with syntax highlighting, in which single-quoted strings ending with a $ are misinterpreted. In such cases, I suspect that the ' is treated as if it belonged to the $ (as if it were part of the special variable $' instead of the quote terminating the string). This causes all subsequent text to be classified as "in the string". Here's a real world sample input $fileType_filesButNot = join( '|', map { quotemeta($_).'$' } @{$fileType->{filesButNot}} ); In order to make the syntax highlighter happy, I have to do something like, $fileType_filesButNot = join( '|', map { quotemeta($_)."\$" } @{$fileType->{filesButNot}} ); which I think is less clear, and also draws comments from my team members during code reviews: Q: why did you make this change? A: because my syntax highlighter didn't handle it the other way Q: have you considered using a better editor, such as Eclipse? A: that was uncalled for, you $%#@!... And, of course, it goes downhill from there. So, in order to preserve the peace at the office, I was hoping to find a workaround for this specific problem of syntax highlighting '$'. I hunted around the net for solutions of this, but I can't even find anyone discussing it. Much thanks for any feedback or suggestions. -stefan In GNU Emacs 24.1.1 (x86_64-unknown-linux-gnu, X toolkit, Xaw3d scroll bars) of 2012-06-12 on l-c4u5build64 Windowing system distributor `The X.Org Foundation', version 11.0.60900000 Configured using: `configure '--prefix=/home/utils/emacs-24.1'' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: nil value of $XMODIFIERS: nil locale-coding-system: nil default enable-multibyte-characters: t Major mode: CPerl Minor modes in effect: which-function-mode: t show-paren-mode: t display-time-mode: t tooltip-mode: t mouse-wheel-mode: t tool-bar-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 line-number-mode: t transient-mark-mode: t Recent input: C-x C-s C-x C-v C-x b C-g " " \ $ C-d C-d C-d " " C-d C-d C-d \ $ C-a C-x C-s C-s ' $ ' C-s C-s C-s C-s C-s $ ' C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-s C-a C-s " $ C-s " \ $ " C-s C-a C-SPC ESC w ESC x r p o r t - e m c s a c s - b u g C-a C-k r e p o r t - e m a c s - b Recent messages: byte-code: End of buffer [8 times] Buffer is read-only: # Saving file /home/scratch.sgottschalk_maxwell-info/testgen_maxwell_conversion_2/dev/inf/testgen/mainline/bin/scripts/admin/convert_or_validate_maxwell_tree.pl... Wrote /home/scratch.sgottschalk_maxwell-info/testgen_maxwell_conversion_2/dev/inf/testgen/mainline/bin/scripts/admin/convert_or_validate_maxwell_tree.pl Error during redisplay: (wrong-type-argument arrayp nil) [3 times] Quit Saving file /home/scratch.sgottschalk_maxwell-info/testgen_maxwell_conversion_2/dev/inf/testgen/mainline/bin/scripts/admin/convert_or_validate_maxwell_tree.pl... Wrote /home/scratch.sgottschalk_maxwell-info/testgen_maxwell_conversion_2/dev/inf/testgen/mainline/bin/scripts/admin/convert_or_validate_maxwell_tree.pl Mark saved where search started [4 times] Mark set Load-path shadows: /home/sgottschalk/emacs/replace hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/replace /home/sgottschalk/emacs/remember/remember hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/textmodes/remember /home/sgottschalk/emacs/verilog-mode hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/progmodes/verilog-mode ~/emacs/org-6.28e/lisp/org-xoxo hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-xoxo ~/emacs/org-6.28e/lisp/org-wl hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-wl ~/emacs/org-6.28e/lisp/org-w3m hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-w3m ~/emacs/org-6.28e/lisp/org-vm hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-vm ~/emacs/org-6.28e/lisp/org-timer hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-timer ~/emacs/org-6.28e/lisp/org-table hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-table ~/emacs/org-6.28e/lisp/org-src hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-src ~/emacs/org-6.28e/lisp/org-rmail hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-rmail ~/emacs/org-6.28e/lisp/org-remember hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-remember ~/emacs/org-6.28e/lisp/org-publish hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-publish ~/emacs/org-6.28e/lisp/org-protocol hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-protocol ~/emacs/org-6.28e/lisp/org-plot hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-plot ~/emacs/org-6.28e/lisp/org-mouse hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-mouse ~/emacs/org-6.28e/lisp/org-mhe hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-mhe ~/emacs/org-6.28e/lisp/org-mew hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-mew ~/emacs/org-6.28e/lisp/org-macs hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-macs ~/emacs/org-6.28e/lisp/org-mac-message hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-mac-message ~/emacs/org-6.28e/lisp/org-list hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-list ~/emacs/org-6.28e/lisp/org-latex hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-latex ~/emacs/org-6.28e/lisp/org-jsinfo hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-jsinfo ~/emacs/org-6.28e/lisp/org-irc hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-irc ~/emacs/org-6.28e/lisp/org-install hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-install ~/emacs/org-6.28e/lisp/org-inlinetask hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-inlinetask ~/emacs/org-6.28e/lisp/org-info hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-info ~/emacs/org-6.28e/lisp/org-id hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-id ~/emacs/org-6.28e/lisp/org-icalendar hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-icalendar ~/emacs/org-6.28e/lisp/org-html hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-html ~/emacs/org-6.28e/lisp/org-gnus hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-gnus ~/emacs/org-6.28e/lisp/org-footnote hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-footnote ~/emacs/org-6.28e/lisp/org-feed hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-feed ~/emacs/org-6.28e/lisp/org-faces hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-faces ~/emacs/org-6.28e/lisp/org-exp hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-exp ~/emacs/org-6.28e/lisp/org-exp-blocks hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-exp-blocks ~/emacs/org-6.28e/lisp/org-docbook hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-docbook ~/emacs/org-6.28e/lisp/org-compat hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-compat ~/emacs/org-6.28e/lisp/org-colview hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-colview ~/emacs/org-6.28e/lisp/org-clock hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-clock ~/emacs/org-6.28e/lisp/org-bibtex hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-bibtex ~/emacs/org-6.28e/lisp/org-bbdb hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-bbdb ~/emacs/org-6.28e/lisp/org-attach hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-attach ~/emacs/org-6.28e/lisp/org-ascii hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-ascii ~/emacs/org-6.28e/lisp/org-archive hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-archive ~/emacs/org-6.28e/lisp/org-agenda hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org-agenda ~/emacs/org-6.28e/lisp/org hides /home/utils/emacs-24.1/share/emacs/24.1/lisp/org/org Features: (shadow sort mail-extr emacsbug sendmail mule-util newcomment ediff-merg ediff-diff ediff-wind ediff-help ediff-util ediff-mult ediff-init ediff cperl-mode add-log perl-mode help-mode view multi-isearch ffap edmacro kmacro org-remember org org-footnote org-src org-list org-faces org-compat org-macs noutline outline easy-mmode cal-menu calendar cal-loaddefs gnus-sum nnoo gnus-group gnus-undo nnmail mail-source gnus-start gnus-spec gnus-int gnus-range message format-spec rfc822 mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047 rfc2045 ietf-drums mailabbrev gmm-utils mailheader gnus-win gnus gnus-ems nnheader gnus-util mail-utils mm-util mail-prsvr wid-edit org-install perltidy remember which-func imenu paren cus-start cus-load xcscope ring gtags lineno cl derived p4 linum cc-mode cc-fonts easymenu cc-guess cc-menus cc-cmds cc-styles cc-align cc-engine cc-vars cc-defs regexp-opt time 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 dynamic-setting font-render-setting x-toolkit x multi-tty emacs)