summaryrefslogtreecommitdiff
path: root/lisp/textmodes/tex-mode.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2005-06-10 10:45:56 +0000
committerMiles Bader <miles@gnu.org>2005-06-10 10:45:56 +0000
commitad49d9d6ecd1884cd9567cc25fcb91354fe43a46 (patch)
tree69fdd55c0aec1af0c66f88acf7466bbb6b7e7be3 /lisp/textmodes/tex-mode.el
parentb4c925d8e57082786c4f7dc5d209888fb8af0f82 (diff)
downloademacs-ad49d9d6ecd1884cd9567cc25fcb91354fe43a46.tar.gz
Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-392
Remove "-face" suffix from tex-mode faces 2005-06-10 Miles Bader <miles@gnu.org> * lisp/textmodes/tex-mode.el (tex-math, tex-verbatim): Remove "-face" suffix from face names. (tex-math-face, tex-verbatim-face): New backward-compatibility aliases for renamed faces. (tex-math-face, tex-verbatim-face): Use renamed tex-mode faces. (tex-insert-quote): Use `tex-verbatim-face' variable instead of literal face name.
Diffstat (limited to 'lisp/textmodes/tex-mode.el')
-rw-r--r--lisp/textmodes/tex-mode.el15
1 files changed, 10 insertions, 5 deletions
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index a715900b604..7d04464346a 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -650,17 +650,22 @@ An alternative value is \" . \", if you use a font with a narrow period."
"Face used for subscripts."
:group 'tex)
-(defface tex-math-face
+(defface tex-math
'((t :inherit font-lock-string-face))
"Face used to highlight TeX math expressions."
:group 'tex)
-(defvar tex-math-face 'tex-math-face)
-(defface tex-verbatim-face
+;; backward-compatibility alias
+(put 'tex-math-face 'face-alias 'tex-math)
+(defvar tex-math-face 'tex-math)
+
+(defface tex-verbatim
;; '((t :inherit font-lock-string-face))
'((t :family "courier"))
"Face used to highlight TeX verbatim environments."
:group 'tex)
-(defvar tex-verbatim-face 'tex-verbatim-face)
+;; backward-compatibility alias
+(put 'tex-verbatim-face 'face-alias 'tex-verbatim)
+(defvar tex-verbatim-face 'tex-verbatim)
;; Use string syntax but math face for $...$.
(defun tex-font-lock-syntactic-face-function (state)
@@ -1101,7 +1106,7 @@ Inserts the value of `tex-open-quote' (normally ``) or `tex-close-quote'
inserts \" characters."
(interactive "*P")
(if (or arg (memq (char-syntax (preceding-char)) '(?/ ?\\))
- (eq (get-text-property (point) 'face) 'tex-verbatim-face)
+ (eq (get-text-property (point) 'face) tex-verbatim-face)
(save-excursion
(backward-char (length tex-open-quote))
(when (or (looking-at (regexp-quote tex-open-quote))