Fix \href{a_b} in tex-mode
* lisp/textmodes/tex-mode.el (tex-font-lock-keywords-2): Fontify href parameters like constants so that _ aren't fontified like subscripts.
This commit is contained in:
parent
8c37b9042e
commit
5909b27144
1 changed files with 5 additions and 0 deletions
|
@ -578,6 +578,9 @@ An alternative value is \" . \", if you use a font with a narrow period."
|
|||
;; "caption" "footnote" "footnotemark" "footnotetext"
|
||||
)
|
||||
t))
|
||||
(file-like (regexp-opt
|
||||
'("href" "ProvidesFile")
|
||||
t))
|
||||
;;
|
||||
;; Names of commands that should be fontified.
|
||||
(specials-1 (regexp-opt '("\\" "\\*") t)) ;; "-"
|
||||
|
@ -598,6 +601,8 @@ An alternative value is \" . \", if you use a font with a narrow period."
|
|||
;;
|
||||
;; Citation args.
|
||||
(list (concat slash citations opt arg) 3 'font-lock-constant-face)
|
||||
;; File-like args.
|
||||
(list (concat slash file-like opt arg) 3 'font-lock-constant-face)
|
||||
;;
|
||||
;; Text between `` quotes ''.
|
||||
(list (concat (regexp-opt '("``" "\"<" "\"`" "<<" "«") t)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue