Discussion:
[AUCTeX] font-latex-script-char-face
Colin Baxter
2017-02-22 13:03:07 UTC
Permalink
I want to remove, outside of custom-set-faces, the foreground color option to
font-latex-script-char-face. I've tried various combinations of

(setq font-latex-script-char-face ((t nil)))

all to non-avail. I'd be grateful for help. Thanks.
Arash Esbati
2017-02-22 13:37:33 UTC
Permalink
Post by Colin Baxter
I want to remove, outside of custom-set-faces, the foreground color option to
font-latex-script-char-face. I've tried various combinations of
(setq font-latex-script-char-face ((t nil)))
all to non-avail. I'd be grateful for help. Thanks.
Emacs manual says[1]

Normally, a face is declared just once, using defface, and any
further changes to its appearance are applied using the Customize
framework (e.g., via the Customize user interface or via the
custom-set-faces function; see Applying Customizations), or by face
remapping (see Face Remapping). In the rare event that you need to
change a face spec directly from Lisp, you can use the face-spec-set
function.

Since `font-latex-script-char-face' is declared with `defface', I would
try something like this (I didn't try, though):

(face-spec-set font-latex-script-char-face
'((t nil)))

Best, Arash

Footnotes:
[1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Faces.html
Colin Baxter
2017-02-22 15:05:06 UTC
Permalink
Hi Arash
Post by Arash Esbati
Post by Colin Baxter
I want to remove, outside of custom-set-faces, the foreground color option to
font-latex-script-char-face. I've tried various combinations of
(setq font-latex-script-char-face ((t nil)))
all to non-avail. I'd be grateful for help. Thanks.
Emacs manual says[1]
Normally, a face is declared just once, using defface, and any
further changes to its appearance are applied using the Customize
framework (e.g., via the Customize user interface or via the
custom-set-faces function; see Applying Customizations), or by face
remapping (see Face Remapping). In the rare event that you need to
change a face spec directly from Lisp, you can use the face-spec-set
function.
Since `font-latex-script-char-face' is declared with `defface', I would
(face-spec-set font-latex-script-char-face
'((t nil)))
Best, Arash
[1] https://www.gnu.org/software/emacs/manual/html_node/elisp/Defining-Faces.html
It seems I need to specify explicitly the foreground. This works:

(face-spec-set 'font-latex-script-char-face '((t (:foreground nil))) nil)

There may be a more elegant way, of course. Thank you.

Best wishes, Colin.

Loading...