From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Jens C. Jensen Newsgroups: gmane.emacs.devel Subject: Re: Getting ready to land native-compilation on master Date: Sat, 10 Apr 2021 10:45:34 +0200 Message-ID: <87a6q6mssx.fsf@subst.net> References: <87a6q7xtz1.fsf@subst.net> <877dlbxp1j.fsf@subst.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35512"; mail-complaints-to="usenet@ciao.gmane.io" Cc: emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sat Apr 10 10:47:45 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lV9HM-000982-Sr for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 10:47:44 +0200 Original-Received: from localhost ([::1]:60324 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lV9HL-00084X-Vl for ged-emacs-devel@m.gmane-mx.org; Sat, 10 Apr 2021 04:47:43 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:39058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lV9G2-0007cs-Ni for emacs-devel@gnu.org; Sat, 10 Apr 2021 04:46:24 -0400 Original-Received: from out0.migadu.com ([2001:41d0:2:267::]:10410) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lV9Fy-0002pV-EC for emacs-devel@gnu.org; Sat, 10 Apr 2021 04:46:22 -0400 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=subst.net; s=key1; t=1618044373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=uISz2j01hfPJJrxbQ1c3fpCpvX0YMhM5TGSD5bdmw8M=; b=ZkJW43UdAN1aaHh486Tb8TdfU3RI7OP10+NTQS6yATJJPcQscC2fP/GjInNDkK0PQt2BMf A5R1fUnECOH45zEn8WGIEj0nqgu6hrmQ6lpcoIFd4v435h/VR+jve1vIgtv42ErNmrMp2q IHtIpMx/KPe7o1xV/VYsfox8dJWJDkd5aHfl8sbj9U1XsmjNpuGgCLiERBycGedpVaJOwv XkT4nQluBLZ+HuZApznDBxWmMn6vjDey3TajB4POZ5zk+zLtom2QfrnVWMIoEiI4TthSSe 8eTjtOQtrrZZYsAUzqL9Qwi45L2Wlpz2TmPUuvxPvnIJYEiCMx+t5mMUHH3oQQ== In-Reply-To: X-Migadu-Flow: FLOW_OUT X-Migadu-Auth-User: jens@subst.net Received-SPF: pass client-ip=2001:41d0:2:267::; envelope-from=jens@subst.net; helo=out0.migadu.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:267781 Archived-At: > From: Stefan Monnier > 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)))'.