GNU bug report logs - #23461
perl mode uses same color for comments and here documents

Previous Next

Package: emacs;

Reported by: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>

Date: Thu, 5 May 2016 21:05:02 UTC

Severity: wishlist

Tags: fixed

Fixed in version 28.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 積丹尼 Dan Jacobson <jidanni <at> jidanni.org>
Cc: 23461 <at> debbugs.gnu.org
Subject: bug#23461: perl mode uses same color for comments and here documents
Date: Wed, 09 Oct 2019 07:52:27 +0200
積丹尼 Dan Jacobson <jidanni <at> jidanni.org> writes:

> perl mode uses same color for comments and here documents.
> Isn't there some other color that can be chosen?
>
> print <<'EOF';
>  <meta name="viewport" content="width=device-width">
> EOF
> # use XML::TreePP;

Yes, that doesn't seem optimal...

But as usual when trying to investigate what's going on with these
syntax things, I have no idea what's going on.  perl-mode detects these
correctly, but I don't know where the mapping from whatever this does to
faces happens, and I can't edebug through syntax-propertize-rules, and
putting a `debug' into the thing is just ignored.

Does anybody know where I should be poking around to find out what's
going on here?

      ;; Here documents.
      ((concat
        "\\(?:"
        ;; << "EOF", << 'EOF', or << \EOF
        "<<\\(~\\)?[ \t]*\\('[^'\n]*'\\|\"[^\"\n]*\"\\|\\\\[[:alpha:]][[:alnum:]]*\\)"
        ;; The <<EOF case which needs perl--syntax-exp-intro-regexp, to
        ;; disambiguate with the left-bitshift operator.
        "\\|" perl--syntax-exp-intro-regexp "<<\\(?2:\\sw+\\)\\)"
        ".*\\(\n\\)")
       (4 (let* ((st (get-text-property (match-beginning 4) 'syntax-table))
                 (name (match-string 2))
                 (indented (match-beginning 1)))
            (goto-char (match-end 2))
            (if (save-excursion (nth 8 (syntax-ppss (match-beginning 0))))
                ;; Leave the property of the newline unchanged.
                st

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 4 years and 197 days ago.

Previous Next


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