[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 5909b27144 2/2: Fix \href{a_b} in tex-mode
From: |
Lars Ingebrigtsen |
Subject: |
master 5909b27144 2/2: Fix \href{a_b} in tex-mode |
Date: |
Mon, 24 Jan 2022 09:19:59 -0500 (EST) |
branch: master
commit 5909b271448e37ba6f71de4b754d1dab6be6875d
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>
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.
---
lisp/textmodes/tex-mode.el | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 1925d93d93..f41cc2c15e 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -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)