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

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

bug#47488: Treatment of # in js.el


From: Lars Ingebrigtsen
Subject: bug#47488: Treatment of # in js.el
Date: Wed, 12 May 2021 15:32:01 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Dmitry Gutov <dgutov@yandex.ru> writes:

>> I think that sounds like a good solution.  Grepping around a bit,
>> perhaps `cpp-font-lock-keywords-source-directives' in font-lock.el would
>> be a good source to use here?
>
> ... looking at the regexp it also matches #file, #line or #warning.
>
> Each of these could also be a name of a private attribute, I
> think. Still, if those are indeed standard preprocessor directives,
> this var looks like a good choice.

I've never heard of the #file directive, but:

;; `cpp-font-lock-keywords-source-directives' is calculated from:
;;
;;          (regexp-opt
;;           '("define"  "elif" "else" "endif" "error" "file" "if" "ifdef"
;;             "ifndef" "import" "include" "line" "pragma" "undef" "warning"))

I spent 30 seconds googling, and I could find no list of directive that
includes #file, so...  Bug #warning is used, and so is #line, so perhaps
it's an old thing?

Anyway, I'll amend the change to js.el to check whether it matches this
regexp.

-- 
(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]