From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tassilo Horn Newsgroups: gmane.emacs.devel Subject: Re: [Emacs-diffs] master 51e7e46: Font-lock elisp macros/special forms dynamically Date: Mon, 16 Mar 2015 08:41:39 +0100 Message-ID: <87wq2h2xu4.fsf@gnu.org> References: <20150315082509.21193.18465@vcs.savannah.gnu.org> <55054CE9.6010702@dancol.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1426491741 7359 80.91.229.3 (16 Mar 2015 07:42:21 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 16 Mar 2015 07:42:21 +0000 (UTC) Cc: Daniel Colascione , emacs-devel@gnu.org To: Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Mar 16 08:42:12 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YXPeo-0005ku-Ej for ged-emacs-devel@m.gmane.org; Mon, 16 Mar 2015 08:41:50 +0100 Original-Received: from localhost ([::1]:47712 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXPen-00072B-1W for ged-emacs-devel@m.gmane.org; Mon, 16 Mar 2015 03:41:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41258) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXPek-000726-87 for emacs-devel@gnu.org; Mon, 16 Mar 2015 03:41:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YXPef-0007Lk-97 for emacs-devel@gnu.org; Mon, 16 Mar 2015 03:41:46 -0400 Original-Received: from deliver.uni-koblenz.de ([141.26.64.15]:55756) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YXPef-0007Le-32 for emacs-devel@gnu.org; Mon, 16 Mar 2015 03:41:41 -0400 Original-Received: from thinkpad-t440p (dhcp132.uni-koblenz.de [141.26.71.132]) (using TLSv1 with cipher AES128-SHA (128/128 bits)) (No client certificate requested) by deliver.uni-koblenz.de (Postfix) with ESMTPSA id 586291A8456; Mon, 16 Mar 2015 08:41:40 +0100 (CET) Mail-Followup-To: Stefan Monnier , Daniel Colascione , emacs-devel@gnu.org In-Reply-To: (Stefan Monnier's message of "Sun, 15 Mar 2015 15:15:57 -0400") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 141.26.64.15 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183897 Archived-At: Stefan Monnier writes: >> Instead of updating a big macro regexp after load, there should be a >> `declare' attribute that would let specific macros (and functions) >> opt into being fontified specially. > > Maybe the other way around would be better: add a declaration that > says "this macro faithfully mimicks the behavior of a function". Both opt-in and opt-out sound reasonable to me, and I don't have a preference. So just tell me what you prefer. AFAICS, I'd need to add a new `(no-)font-lock-keyword' entry to `macro-declarations-alist' and then check (get macro '(no-)font-lock-keyword) in the code building the regex, right? Or in case of opt-in, (declare 'font-lock-keyword) could add the symbol to a list of macros to font-lock as keywords so that we don't need to check all symbols in `obarray'. The name (no-)font-lock-keyword is open to discussion, of course. Also, I'd like to rename the new lisp--el-*-macro-* symbols to lisp--el-*-keyword-* since they deal with both macros and special forms, i.e., they deal with stuff font-locked with keyword face. Bye, Tassilo