From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Nikolaj Schumacher Newsgroups: gmane.emacs.help Subject: Re: how is emacs lisp syntax colored in emacs-lisp-mode? Date: Tue, 10 Mar 2009 21:06:16 +0100 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1236715689 17501 80.91.229.12 (10 Mar 2009 20:08:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Mar 2009 20:08:09 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Xah Lee Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Tue Mar 10 21:09:25 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1Lh8FA-0007tx-KY for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Mar 2009 21:08:05 +0100 Original-Received: from localhost ([127.0.0.1]:49528 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lh8Do-0006Yi-JC for geh-help-gnu-emacs@m.gmane.org; Tue, 10 Mar 2009 16:06:40 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lh8DU-0006V4-Qi for help-gnu-emacs@gnu.org; Tue, 10 Mar 2009 16:06:20 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lh8DU-0006UA-3j for help-gnu-emacs@gnu.org; Tue, 10 Mar 2009 16:06:20 -0400 Original-Received: from [199.232.76.173] (port=59731 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lh8DU-0006U0-13 for help-gnu-emacs@gnu.org; Tue, 10 Mar 2009 16:06:20 -0400 Original-Received: from dd18200.kasserver.com ([85.13.138.168]:42102) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lh8DT-0000Fv-ID for help-gnu-emacs@gnu.org; Tue, 10 Mar 2009 16:06:19 -0400 Original-Received: from thursday (g229217241.adsl.alicedsl.de [92.229.217.241]) by dd18200.kasserver.com (Postfix) with ESMTP id 09C2D18078F79; Tue, 10 Mar 2009 21:06:20 +0100 (CET) In-Reply-To: (Xah Lee's message of "Tue, 10 Mar 2009 05:45:03 -0700 (PDT)") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (darwin) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:62818 Archived-At: Xah Lee wrote: > for example, these keywords would be colored purple by default: > > defun, lambda, while, if, progn, save-restriction, ... > > while the following built-in keywords are uncolored (black): > narrow-to-region, mapc, goto-char, point-min, search-forward, car, > nil, replace-match ... etc. Those aren't emacs lisp "keywords". Those are ordinary functions. They are called "built-in", because they happen to be written in C instead of Lisp. But that is hardly relevant, and can even change over time. defun, lambda and while are not functions, but special forms. They are part of the language. save-*, with-* and others are macros based on special forms. They aren't keywords either, but probably colored (and indented) differently for convenience. If you want to highlight symbols that are "shipped" with Emacs (to whatever extend) you'll need to add a matcher function to the font lock keywords that checks whether, and in which files, symbols have been defined > is there a principle of how the keywords are colored? regards, Nikolaj Schumacher