When I paste a text inside quotation marks into Emacs+AUCTeX, AUCTeX formats it with a soft red color (see the screenshot below at the first line).
I like this color. However, I'm using csquotes
package to handle (multilingual) quotations marks. The \enquote
commands (provided by csquote
package) use another color. I don't like this last color (see screenshot at the second line). With this ugly soft green color, I cannot find quickly quotation inside a big document.
How can I change csquotes
default color to use AUCTeX default one?
The screenshot:
(This screenshot uses French quotation marks but it hasn't any influence on my question.)
There is a bunch of settings about fontification in the csquotes.el file but I didn't see any reference to colors:
;; Fontification
(when (and (featurep 'font-latex)
(eq TeX-install-font-lock 'font-latex-setup))
(font-latex-add-keywords '(("DisableQuotes" "")
("RestoreQuotes" ""))
'function)
(font-latex-add-keywords '(("enquote" "*{")
("foreignquote" "*{{")
("hyphenquote" "*{{")
("textcquote" "*[[{[{")
("foreigntextcquote" "*{[[{[{")
("hyphentextcquote" "*{[[{[{")
("textquote" "*[[{")
("foreigntextquote" "*{[[{")
("hyphentextquote" "*{[[{")
("blockquote" "[[{")
("foreignblockquote" "{[[{")
("hyphenblockquote" "{[[{")
("blockcquote" "[[{[{")
("foreignblockcquote" "{[[{[{")
("hyphenblockcquote" "{[[{[{"))
'textual)
(font-latex-add-keywords '(("setquotestyle" "[{")
("MakeOuterQuote" "{")
("MakeInnerQuote" "{")
("MakeAutoQuote" "*{{")
("MakeForeignQuote" "*{{{")
("MakeHyphenQuote" "*{{{")
("MakeBlockQuote" "{{{")
("MakeForeignBlockQuote" "{{{{")
("MakeHyphenBlockQuote" "{{{{")
("DeclareQuoteStyle" "[{[[{[{[{[{")
("DeclareQuoteAlias" "[{{")
("DeclareQuoteOption" "{")
("DeclarePlainStyle" "{{{{")
("SetBlockThreshold" "{")
("SetBlockEnvironment" "{")
("SetCiteCommand" "{"))
'variable)))))
;;; csquotes.el ends here
\enquote
to the font command, like\emph
etc. Then you can also give it a nice shortcut. That is theLaTeX-font-list
variable. That being said, I do not know how to change the font on it. It ought to be there somewhere since Emacs know to format\textbf
and\emph
differently. – daleif May 19 '14 at 10:12\enquote
by pressing " twice). I can addenquote
toLaTeX-font-list
but I don't know (either) how to set a color to this command... – ppr May 19 '14 at 10:18"
shortcut? I like the font listfeature as it makes it easy to change the macro or remove it. There is some info about the fonts used inlatex-font.el
in the auctex sources. – daleif May 19 '14 at 11:05enquote
is assigned a property value of'textual
. If you search the source-code forlatex-font.el
as @daleif indicated, you will find the section of code that usesfont-lock-type-face
. Did you try placing your cursor on the color you want to change and type?:C-u C-x =
If you did that, did the information window sayfont-lock-type-face
was a face at that particular point? And if it said that, did you try changing the color forfont-lock-type-face
usingM-x customize-face RET font-lock-type-face RET
– lawlist Mar 8 '15 at 6:05