From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#15219: Emacs Lisp mode and Lisp mode font-locking Date: Fri, 30 Aug 2013 08:45:15 -0400 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1377866782 13001 80.91.229.3 (30 Aug 2013 12:46:22 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 30 Aug 2013 12:46:22 +0000 (UTC) Cc: 15219@debbugs.gnu.org To: Bozhidar Batsov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Aug 30 14:46:23 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1VFO5m-0002Do-KQ for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Aug 2013 14:46:22 +0200 Original-Received: from localhost ([::1]:49974 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFO5m-0002XS-56 for geb-bug-gnu-emacs@m.gmane.org; Fri, 30 Aug 2013 08:46:22 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:46890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFO5a-0002JG-Mw for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2013 08:46:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VFO5T-00061t-D7 for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2013 08:46:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50542) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VFO5T-00061m-A4 for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2013 08:46:03 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VFO5S-0001Gh-JF for bug-gnu-emacs@gnu.org; Fri, 30 Aug 2013 08:46:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 30 Aug 2013 12:46:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15219 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 15219-submit@debbugs.gnu.org id=B15219.13778667294823 (code B ref 15219); Fri, 30 Aug 2013 12:46:02 +0000 Original-Received: (at 15219) by debbugs.gnu.org; 30 Aug 2013 12:45:29 +0000 Original-Received: from localhost ([127.0.0.1]:58834 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VFO4u-0001Fh-Di for submit@debbugs.gnu.org; Fri, 30 Aug 2013 08:45:28 -0400 Original-Received: from ironport2-out.teksavvy.com ([206.248.154.182]:44738) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VFO4n-0001FI-0K for 15219@debbugs.gnu.org; Fri, 30 Aug 2013 08:45:25 -0400 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IPAS-Result: Av4EABK/CFHO+KK6/2dsb2JhbABEvw4Xc4IeAQEEAVYjBQsLNBIUGA0kiB4GwS2RCgOkeoFegxM X-IronPort-AV: E=Sophos;i="4.84,565,1355115600"; d="scan'208";a="26039485" Original-Received: from 206-248-162-186.dsl.teksavvy.com (HELO pastel.home) ([206.248.162.186]) by ironport2-out.teksavvy.com with ESMTP/TLS/ADH-AES256-SHA; 30 Aug 2013 08:42:31 -0400 Original-Received: by pastel.home (Postfix, from userid 20848) id 102E262E73; Fri, 30 Aug 2013 08:45:15 -0400 (EDT) In-Reply-To: (Bozhidar Batsov's message of "Fri, 30 Aug 2013 12:32:05 +0300") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:77820 Archived-At: > I've noticed something odd about the font-locking in Emacs Lisp mode and > Lisp mode - keyword args are highlighted using the font-lock-builtin-face > and constructs like &optional are highlighted using > font-lock-type-face. I guess this was was done way back and hasn't been > updated in a while, but I think it might a good idea to revise this. Pretty > sure those font faces are intended for different usage. I think it would be > great if all Emacs programming modes used the built-in font-lock faces > consistently, so that the meaning of certain faces doesn't change from mode > to mode. I guess that the two modes might also start using the > font-lock-built-in face to highlight their core functions (like car, cdr, > mapcar, mapc, etc) - as Clojure mode does. Personally I feel that uses of > the keyword face for things that are not special forms (like the when macro) > should be replaced with uses of the built-in face. Which things are special forms and which things are macros is somewhat arbitrary. The important thing to know about them is that they're not functions, so their arguments may not be evaluated in the usual way. Also macros are used to introduce new syntactic constructs: in normal programming languages, something like `when' would be highlighted as a `keyword', not as a `builtin'. I'm not completely sure what the `builtin' is used for, usually. What information is it meant to provide? I mean, do you consider `mapcar' "builtin" because it's fast? Because it's implemented in C? Because it's predefined (no need for any kind of autoloading/require)? Is `car' builtin because "if you didn't have it, you'd have to invent it" (IOW can't be implemented in Elisp)? Stefan