[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: port x-symbol to GNU emacs 24.
From: |
Tassilo Horn |
Subject: |
Re: port x-symbol to GNU emacs 24. |
Date: |
Wed, 19 Aug 2015 18:34:40 +0200 |
User-agent: |
Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.50 (gnu/linux) |
Hi again,
I finally found out what's the culprit. AUCTeX' font-latex uses
syntactic font-lock for the tex math construct $ ... $, i.e., for
fontification purposes it gives $ string-syntax and then uses a custom
`font-lock-syntactic-face-function' to assign either string, comment, or
math face.
So basically, the value of
(defvar font-latex-syntax-alist
;; Use word syntax for @ because we use \> for matching macros and
;; we don't want address@hidden to be found if we search for \foo.
'((?\( . ".") (?\) . ".") (?$ . "\"") (?@ . "w"))
"List of specifiers for the syntax alist of `font-lock-defaults'.")
is used as SYNTAX-ALIST in `font-lock-defaults'.
I have no clue why parens get punctuation syntax, though. I checked the
VC history, and back in the old times there was a comment
;; Parentheses () disabled because they should not delimit fontification
;; in LaTeX text.
whatever that means. But that's the reason why \(\alpha\) is not
prettified but \( \alpha\) is: there mustn't be a character with
punctuation syntax before the symbol to be prettified. (I think that's
probably sensible in C-like languages but not in TeX or Lisp.)
Is there a way that I can use a custom SYNTAX-ALIST only for syntactic
but not search-based fontification?
Bye,
Tassilo
- Re: port x-symbol to GNU emacs 24., (continued)
- Re: port x-symbol to GNU emacs 24., Stefan Monnier, 2015/08/14
- Re: port x-symbol to GNU emacs 24., Uwe Brauer, 2015/08/14
- Re: port x-symbol to GNU emacs 24., Tassilo Horn, 2015/08/17
- Re: port x-symbol to GNU emacs 24., Eli Zaretskii, 2015/08/17
- Re: port x-symbol to GNU emacs 24., David Kastrup, 2015/08/17
- Re: port x-symbol to GNU emacs 24., Eli Zaretskii, 2015/08/17
- Re: port x-symbol to GNU emacs 24., Tassilo Horn, 2015/08/18
- Re: port x-symbol to GNU emacs 24., Stefan Monnier, 2015/08/18
- Re: port x-symbol to GNU emacs 24., Tassilo Horn, 2015/08/19
- Re: port x-symbol to GNU emacs 24., Tassilo Horn, 2015/08/19
- Re: port x-symbol to GNU emacs 24.,
Tassilo Horn <=
- Re: port x-symbol to GNU emacs 24., Stefan Monnier, 2015/08/19
- Generalizing prettify-symbols-mode (was: port x-symbol to GNU emacs 24.), Tassilo Horn, 2015/08/20
- Re: Generalizing prettify-symbols-mode, Stefan Monnier, 2015/08/20
- Re: Generalizing prettify-symbols-mode, Tassilo Horn, 2015/08/21
- Re: Generalizing prettify-symbols-mode, Tassilo Horn, 2015/08/21
- Re: Generalizing prettify-symbols-mode, Stefan Monnier, 2015/08/21
- Re: port x-symbol to GNU emacs 24., Tassilo Horn, 2015/08/20
- Re: port x-symbol to GNU emacs 24., Stefan Monnier, 2015/08/20
- Re: port x-symbol to GNU emacs 24., Tassilo Horn, 2015/08/21
- Re: port x-symbol to GNU emacs 24., David Kastrup, 2015/08/21