From: "Drew Adams" <drew.adams@oracle.com>
To: <gerald.jean@dgag.ca>
Cc: help-gnu-emacs@gnu.org
Subject: RE: Font-lock-faces in Emacs 23.2
Date: Thu, 16 Dec 2010 13:47:23 -0800 [thread overview]
Message-ID: <ADBC63702AED41C880795AD3E94548D6@us.oracle.com> (raw)
In-Reply-To: <OF810E8CFA.AF99CA60-ON852577FB.0068A6D6-852577FB.0074F20F@dgag.ca>
> > 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.
prev parent reply other threads:[~2010-12-16 21:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-16 14:13 Font-lock-faces in Emacs 23.2 gerald.jean
2010-12-16 16:16 ` Drew Adams
2010-12-16 21:17 ` gerald.jean
2010-12-16 21:47 ` Drew Adams [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ADBC63702AED41C880795AD3E94548D6@us.oracle.com \
--to=drew.adams@oracle.com \
--cc=gerald.jean@dgag.ca \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.