From ad49d9d6ecd1884cd9567cc25fcb91354fe43a46 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 10 Jun 2005 10:45:56 +0000 Subject: [PATCH] Revision: miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-392 Remove "-face" suffix from tex-mode faces 2005-06-10 Miles Bader * 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. --- lisp/ChangeLog | 8 ++++++++ lisp/textmodes/tex-mode.el | 15 ++++++++++----- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 84cc6c6ee22..0b13139e0ae 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,13 @@ 2005-06-10 Miles Bader + * 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. + * textmodes/table.el (table-cell): Remove "-face" suffix from face name. (table-cell-face): New backward-compatibility alias for renamed face. 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)) -- 2.39.5