summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-01-24 15:15:59 +0100
committerLars Ingebrigtsen <larsi@gnus.org>2022-01-24 15:15:59 +0100
commit8c37b9042eb78beead4e3e85273e4543523abcca (patch)
tree07a29f7a8ac28bcc21bce41df5fbf3d199408fe5
parent79d9f3982fe6e558327584099f2efc96e51485a1 (diff)
downloademacs-8c37b9042eb78beead4e3e85273e4543523abcca.tar.gz
Revert "Fix tex-mode handling of _ chars in href{} commands"
This reverts commit 487a0be7f7eb0ca9402247f13a11e39aa2946d05. This will be fixed a different way.
-rw-r--r--lisp/textmodes/tex-mode.el12
1 files changed, 1 insertions, 11 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 929181960bc..1925d93d93a 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -630,14 +630,6 @@ An alternative value is \" . \", if you use a font with a narrow period."
3 '(tex-font-lock-append-prop 'bold) 'append)))))
"Gaudy expressions to highlight in TeX modes.")
-(defun tex--current-command ()
- "Return the previous \\\\command."
- (save-excursion
- (and (re-search-backward "\\\\\\([a-zA-Z@]+\\)\\*?\\({\\)?" nil t)
- ;; Ignore commands that don't have contents.
- (and (match-string 2)
- (match-string 1)))))
-
(defun tex-font-lock-suscript (pos)
(unless (or (memq (get-text-property pos 'face)
'(font-lock-constant-face font-lock-builtin-face
@@ -647,9 +639,7 @@ An alternative value is \" . \", if you use a font with a narrow period."
(pos pos))
(while (eq (char-before pos) ?\\)
(setq pos (1- pos) odd (not odd)))
- odd)
- ;; Allow bare _ characters in some commands.
- (member (tex--current-command) '("href" "ProvidesFile")))
+ odd))
(if (eq (char-after pos) ?_)
`(face subscript display (raise ,(car tex-font-script-display)))
`(face superscript display (raise ,(cadr tex-font-script-display))))))