bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#23461: perl mode uses same color for comments and here documents


From: Lars Ingebrigtsen
Subject: bug#23461: perl mode uses same color for comments and here documents
Date: Wed, 09 Oct 2019 07:52:27 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux)

積丹尼 Dan Jacobson <jidanni@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





reply via email to

[Prev in Thread] Current Thread [Next in Thread]