emacs-devel
[Top][All Lists]
Advanced

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

Re: Getting ready to land native-compilation on master


From: Jens C . Jensen
Subject: Re: Getting ready to land native-compilation on master
Date: Sat, 10 Apr 2021 10:45:34 +0200

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Date: Fri, 09 Apr 2021 18:43:59 -0400
> Cc: emacs-devel@gnu.org

>>> I'm curious: why would it affect syntax highlighting?
>> I'm using `highlight-defined', which adds faces to defined
>> variables/functions, I don't think it messes with any
>> built-in highlighting.
>
> Still: why does `subrp` affect it?

The problem seems to be the way `highlight-defined.el' determines if a function 
is built-in, using `(subrp (indirect-function #'some-function))'.

This evaluates to `nil' when an elisp function is defined or byte-compiled, but 
to `t' when it is native-compiled (or actually built-in).

The solution seems to be, like Andrea suggested, to test if a function is
`(and (subrp) (not (subr-native-elisp-p)))'.



reply via email to

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