emacs-devel
[Top][All Lists]
Advanced

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

Re: Help Understanding syntax-propertize-function


From: Filipp Gunbin
Subject: Re: Help Understanding syntax-propertize-function
Date: Wed, 24 Mar 2021 23:29:21 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (darwin)

There's the prog1 form at the end of hcl--font-lock-open-heredoc:

...
      (prog1 (string-to-syntax "|")
        (goto-char (+ 2 start))))))

It looks like it's meant to be a special "(prog1 EXP . EXPS)" form for
syntax-propertize-rules.  But it's inside of a defun used as SYNTAX:

...
   (syntax-propertize-rules
    (hcl--here-doc-beg-re
     (2 (hcl--font-lock-open-heredoc
         (match-beginning 0) (match-string 1) (match-beginning 2))))

I wonder - how could that work?  Does syntax-propertize-rules inspect
the SYNTAX expression to check for suchlike forms?

Filipp



reply via email to

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