From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: Font-lock-faces in Emacs 23.2 Date: Thu, 16 Dec 2010 13:47:23 -0800 Message-ID: References: <3E65AA26F2AB42C594FCD8E8F76A2BAE@us.oracle.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1292537372 31444 80.91.229.12 (16 Dec 2010 22:09:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 16 Dec 2010 22:09:32 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 16 23:09:27 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 1PTM0q-0003Dd-Tp for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Dec 2010 23:09:25 +0100 Original-Received: from localhost ([127.0.0.1]:40009 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTLhP-0005lW-EI for geh-help-gnu-emacs@m.gmane.org; Thu, 16 Dec 2010 16:49:19 -0500 Original-Received: from [140.186.70.92] (port=58314 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PTLgx-0005kf-SX for help-gnu-emacs@gnu.org; Thu, 16 Dec 2010 16:48:55 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PTLgw-0000q6-M2 for help-gnu-emacs@gnu.org; Thu, 16 Dec 2010 16:48:51 -0500 Original-Received: from rcsinet10.oracle.com ([148.87.113.121]:23532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PTLgw-0000q0-Eb for help-gnu-emacs@gnu.org; Thu, 16 Dec 2010 16:48:50 -0500 Original-Received: from rcsinet13.oracle.com (rcsinet13.oracle.com [148.87.113.125]) by rcsinet10.oracle.com (Switch-3.4.2/Switch-3.4.2) with ESMTP id oBGLmkpG021323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 16 Dec 2010 21:48:48 GMT Original-Received: from acsmt353.oracle.com (acsmt353.oracle.com [141.146.40.153]) by rcsinet13.oracle.com (Switch-3.4.2/Switch-3.4.1) with ESMTP id oBGLmiQ4013895; Thu, 16 Dec 2010 21:48:44 GMT Original-Received: from abhmt021.oracle.com by acsmt353.oracle.com with ESMTP id 861012811292536042; Thu, 16 Dec 2010 13:47:22 -0800 Original-Received: from dradamslap1 (/130.35.178.194) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Thu, 16 Dec 2010 13:47:21 -0800 X-Mailer: Microsoft Office Outlook 11 Thread-Index: AcudZqKTETpPq0iKQ4et3RAApEdJWgAAMyTg In-Reply-To: X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5994 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) 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:77604 Archived-At: > > varying things, to see what you can discover. > > This is what I did and thanks to Drew I located the problem. > I would never have thought of looking there though since the problem > originates from an Emacs package I use very heavily, every day, for > years, ess (Emacs Speaks Statistics), furthermore, the problem > occurred after the upgrade from 21.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. Is that `(ess-font-lock-db)' occurrence at the top level of some file that you load? IOW, is it getting eval'd unconditionally whenever you load ESS? If so, I would recommend that you file an ESS bug. Merely loading a library should not change user settings this way. Some reasonable ways for a library to deal with this kind of thing: a. Just recommend particular settings, in a comment or doc string, without actually setting them. b. Provide a command that sets the recommended settings. c. Provide its own user options or faces with the recommended values as the default values. That way, users can customize them. > I replaced the offending "Goldenrod" by "OrangeRed" and > everything is fine, the only thing now is that at each > upgrade I'll have to remember to change this! That's why it's better to file a bug report. You should not need to modify source code that way. > 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 didn't my settings override the "ess-font-lock-db" settings? Dunno. Are you sure `ess-font-lock-db' wasn't called again later? `custom-set-faces' unconditionally sets the faces each time it is called. For example: (custom-set-faces '(font-lock-comment-face ((t (:foreground "Red"))))) (set-face-foreground 'font-lock-comment-face "DarkBlue") (custom-set-faces '(font-lock-comment-face ((t (:foreground "DarkGreen"))))) Put your cursor after each of these sexps in turn and hit `C-x C-e' to evaluate it. My guess is that something is calling `ess-font-lock-db' again after your .emacs is loaded.