From: gerald.jean@dgag.ca
To: drew.adams@oracle.com
Cc: help-gnu-emacs@gnu.org
Subject: RE: Font-lock-faces in Emacs 23.2
Date: Thu, 16 Dec 2010 16:17:20 -0500 [thread overview]
Message-ID: <OF810E8CFA.AF99CA60-ON852577FB.0068A6D6-852577FB.0074F20F@dgag.ca> (raw)
In-Reply-To: <3E65AA26F2AB42C594FCD8E8F76A2BAE@us.oracle.com>
"Drew Adams" <drew.adams@oracle.com> a écrit sur 2010/12/16 11:16:52 :
> > 1.- M-x customize-group <enter>
> > 2.- font-lock-faces <enter>
> > 3.- Then move down to the "Font Lock Type Face"...
> > 4.- Then change the Foreground entry... to OrangeRed...
> > 5.- ...click the <Set for current session> button
> > and the <Save for future sessions button>, reply <yes>...
>
> 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 part
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 Customize
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 sessions,
but
> that perhaps font-lock-mode wasn't turned on? Which color is indicated
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 hasonly
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 find
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 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.
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 <David.Brahm@fmr.com>"
(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") ; talk<-
{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 fine,
the only thing now is that at each upgrade I'll have to remember to change
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 didn't
my settings override the "ess-font-lock-db" settings?
Thanks again to Drew Adams, this was annoying me for a while,
Gérald Jean
Conseiller senior en statistiques,
VP Actuariat et Solutions d'assurances,
Desjardins Groupe d'Assurances Générales
télephone : (418) 835-4900 poste (7639)
télecopieur : (418) 835-6657
courrier électronique: gerald.jean@dgag.ca
"We believe in God, others must bring Data."
W. Edwards Deming
next prev parent reply other threads:[~2010-12-16 21:17 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 [this message]
2010-12-16 21:47 ` Drew Adams
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=OF810E8CFA.AF99CA60-ON852577FB.0068A6D6-852577FB.0074F20F@dgag.ca \
--to=gerald.jean@dgag.ca \
--cc=drew.adams@oracle.com \
--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.