From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: gerald.jean@dgag.ca Newsgroups: gmane.emacs.help Subject: RE: Font-lock-faces in Emacs 23.2 Date: Thu, 16 Dec 2010 16:17:20 -0500 Message-ID: References: <3E65AA26F2AB42C594FCD8E8F76A2BAE@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: dough.gmane.org 1292534293 5703 80.91.229.12 (16 Dec 2010 21:18:13 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 16 Dec 2010 21:18:13 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: drew.adams@oracle.com Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 16 22:18:08 2010 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.69) (envelope-from ) id 1PTLDD-0005qZ-Eh for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Dec 2010 22:18:07 +0100 Original-Received: from localhost ([127.0.0.1]:35258 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTLDC-0004l5-DA for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Dec 2010 16:18:06 -0500 Original-Received: from [140.186.70.92] (port=52978 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTLCo-0004kw-1x for help-gnu-emacs@gnu.org; Thu, 16 Dec 2010 16:17:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTLCm-00044R-5a for help-gnu-emacs@gnu.org; Thu, 16 Dec 2010 16:17:41 -0500 Original-Received: from mail2.dgdom.net ([206.47.217.124]:30816) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTLCm-00043S-11 for help-gnu-emacs@gnu.org; Thu, 16 Dec 2010 16:17:40 -0500 X-IronPort-AV: E=Sophos;i="4.59,356,1288584000"; d="scan'208";a="3429744" Original-Received: from unknown (HELO mail.spgdag.ca) ([192.168.2.253]) by ironportl01.dgdom.net with ESMTP; 16 Dec 2010 16:17:22 -0500 In-Reply-To: <3E65AA26F2AB42C594FCD8E8F76A2BAE@us.oracle.com> X-Mailer: Lotus Notes Release 7.0.2 September 26, 2006 X-MIMETrack: Serialize by Router on NTNOPASL1/SRVEXT/SPGDAG/Desjardins(Release 7.0.2FP3|December 13, 2007) at 12/16/2010 04:17:22 PM X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. 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:77602 Archived-At: "Drew Adams" a =E9crit sur 2010/12/16 11:16:52 = : > > 1.- M-x customize-group > > 2.- font-lock-faces > > 3.- Then move down to the "Font Lock Type Face"... > > 4.- Then change the Foreground entry... to OrangeRed... > > 5.- ...click the button > > and the , reply ... > > No need do `Set', since you're doing `Save' (but it doesn't hurt). I'll remember this one. > > > 6.- Exit customize > ... > > Customize has written the following code to my <.emac> file, > > and this is the last statement in my <.emacs> file: > > > > (custom-set-faces... > > '(dired-header ((t (:inherit default :foreground "OrangeRed")))) > > '(font-lock-type-face ((t (:foreground "OrangeRed"))))... > > Does your .emacs get loaded that far, so that the `customize-set- > faces' actually > gets eval'd? E.g., does the `dired-header' face show up OK? Yes it does, in OrangeRed as specified. > > Font lock is sometimes a bit special. What happens if you customize > a different > font-lock face, e.g. `font-lock-doc-face'? Does that work (for subsequent > sessions)? For reasons I don't understand I couldn't customize "font-lock-doc-face= ", everything I tried to do in there emacs told me I couldn't edit this pa= rt of the field, I tried every where in the "Foreground" field, this field= was not ticked though? Hence I tried a different font-lock-face, "font-lock-keyword-face", I setted it to "Red" and accordingly Customiz= e wrote the following line in my .emacs. '(font-lock-keyword-face ((t (:foreground "Red")))) Didn't stay for future sessions? > > Are you sure that the face wasn't in fact customized for future sessi= ons, but > that perhaps font-lock-mode wasn't turned on? Which color is indicat= ed as the > foreground setting after you start up the second time, if you do > `customize-face > RET font-lock-type-face RET' then? Goldenrod, as it always indicates upon a new startup? > > Try (after backing up your .emacs) using a different .emacs that haso= nly this > in it: > > (custom-set-faces > '(font-lock-type-face ((t (:foreground "OrangeRed"))))) > > If that works, then try commenting out half of your original .emacs > (leaving the > `custom-set-faces'), then comment-out 3/4, 7/8, 15/16,... until you f= ind which > part of your init file is interfering. > > In sum, play around a little, varying things, to see what you can discover. > This is what I did and thanks to Drew I located the problem. I would n= ever have thought of looking there though since the problem originates from = an Emacs package I use very heavily, every day, for years, ess (Emacs Spea= ks Statistics), furthermore, the problem occurred after the upgrade from 2= 1.3 to 23.2, it was OK before? (require 'ess-site) (require 'ess-font-lock) (ess-font-lock-db) ;; This single function caused the problem. I went to "ess-font-lock.el" and found: (defun ess-font-lock-db () "Set font-lock colors (leave fore-/back-ground alone) courtesy David Brahm " (interactive) (set-face-foreground 'font-lock-comment-face "Firebrick") ; #.= .. %... (set-face-foreground 'font-lock-string-face "SeaGreen") ; ".= .." "..." (set-face-foreground 'font-lock-keyword-face "MediumBlue") ; if= \end (set-face-foreground 'font-lock-function-name-face "VioletRed") ; ta= lk<- {center} (set-face-foreground 'font-lock-variable-name-face "Blue") ; = xv (set-face-foreground 'font-lock-type-face "Goldenrod") ; T,= F ? (set-face-foreground 'font-lock-constant-face "Magenta") ; <-= {eq1} ) I replaced the offending "Goldenrod" by "OrangeRed" and everything is f= ine, the only thing now is that at each upgrade I'll have to remember to cha= nge this! There is something I'd like explained if possible. Given that I have (custom-set-faces... '(dired-header ((t (:inherit default :foreground "OrangeRed")))) '(font-lock-type-face ((t (:foreground "OrangeRed"))))... way later than the call to "ess-font-lock-db" in my .emacs file why did= n't my settings override the "ess-font-lock-db" settings? Thanks again to Drew Adams, this was annoying me for a while, G=E9rald Jean Conseiller senior en statistiques, VP Actuariat et Solutions d'assurances, Desjardins Groupe d'Assurances G=E9n=E9rales t=E9lephone : (418) 835-4900 poste (7639) t=E9lecopieur : (418) 835-6657 courrier =E9lectronique: gerald.jean@dgag.ca "We believe in God, others must bring Data." W. Edwards Deming=