From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jeff Mincy Newsgroups: gmane.emacs.help Subject: Re: Two questions Date: 11 Sep 2002 20:57:34 -0400 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031792769 8962 127.0.0.1 (12 Sep 2002 01:06:09 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 12 Sep 2002 01:06:09 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17pIQq-0002KN-00 for ; Thu, 12 Sep 2002 03:06:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17pIQs-0001Q8-00; Wed, 11 Sep 2002 21:06:10 -0400 Original-Path: shelby.stanford.edu!nntp.stanford.edu!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!feed2.news.rcn.net!feed1.news.rcn.net!rcn!not-for-mail Original-Newsgroups: comp.emacs,gnu.emacs.help Original-Lines: 38 Original-X-Trace: UmFuZG9tSVZdZBk/spCngj9mCEe1fJWQ7aftH56YUsu7xVh+NSH+zbw+B01RoAy4 Original-X-Complaints-To: abuse@rcn.com Original-NNTP-Posting-Date: 12 Sep 2002 00:59:50 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp (Windows)) Original-Xref: nntp.stanford.edu comp.emacs:74402 gnu.emacs.help:104777 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:1332 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:1332 On Wed, 11 Sep 2002, frank@consol.de wrote: > On Tue, 10 Sep 2002 09:42:06 +0200, Peter Weiss, wrote: > > >> my attempts to customize them. But I didn't find the code which > >> recognizes the commands and sets the colors; is this hard-coded? > > > >Nope, like allways in Emacs: You can modify nearly everything to fit your > >needs. Check the info docs for "font-lock". Font-lock-mode is activated > >for example globally with > > > > (global-font-lock-mode 1) > > Ok, "font-lock-mode" seems to be a good trace. If I enable this mode, my > Perl program gets fontified. But I still don't understand why and how. The > word "perl" doesn't appear in font-lock.el. You got it backwards... Look for font-lock in perl-mode.el or cperl-mode.el depending on which one you are really using. > So where exactly is the keyword-color mapping defined? Why is this not > coupled to perl-mode.el? Perhaps you are looking for the faces that are being used: (defvar cperl-tips-faces 'please-ignore-this-line "CPerl mode uses following faces for highlighting: `cperl-array-face' Array names `cperl-hash-face' Hash names `font-lock-comment-face' Comments, PODs and whatever is considered ... `font-lock-constant-face' HERE-doc delimiters, labels, delimiters of... `font-lock-function-name-face' Special-cased m// and s//foo/, _ as I'm guessing you are wanting to customize the colors of the various faces... -jeff