changeset 60232:dd2690f78878

(tex-font-lock-keywords-3): #n is atomic.
author Stefan Monnier <monnier@iro.umontreal.ca>
date Thu, 24 Feb 2005 15:33:02 +0000
parents d720532c5764
children fc9f41873810
files lisp/textmodes/tex-mode.el
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/textmodes/tex-mode.el	Thu Feb 24 14:21:02 2005 +0000
+++ b/lisp/textmodes/tex-mode.el	Thu Feb 24 15:33:02 2005 +0000
@@ -1,7 +1,7 @@
 ;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands -*- coding: utf-8 -*-
 
 ;; Copyright (C) 1985, 1986, 1989, 1992, 1994, 1995, 1996, 1997, 1998, 1999,
-;;   2002, 2003, 2004  Free Software Foundation, Inc.
+;;   2002, 2003, 2004, 2005  Free Software Foundation, Inc.
 
 ;; Maintainer: FSF
 ;; Keywords: tex
@@ -602,7 +602,7 @@
 	   ;; degenerate to nasty complexity (because we try to match the
 	   ;; closing brace, which forces trying all matching combinations).
 	   (arg "{\\(?:[^{}\\]\\|\\\\.\\|{[^}]*}\\)*"))
-       `((,(concat "[_^] *\\([^\n\\{}]\\|" slash general "\\|" arg "}\\)")
+       `((,(concat "[_^] *\\([^\n\\{}#]\\|" slash general "\\|#[0-9]\\|" arg "}\\)")
 	  (1 (tex-font-lock-suscript (match-beginning 0))
 	     append))))))
   "Experimental expressions to highlight in TeX modes.")
@@ -1027,10 +1027,8 @@
        'tex-categorize-whitespace)
   (set (make-local-variable 'facemenu-add-face-function)
        (lambda (face end)
-	 (let ((face-text (cdr (assq face tex-face-alist))))
-	   (if face-text
-	       face-text
-	     (error "Face %s not configured for %s mode" face mode-name)))))
+	 (or (cdr (assq face tex-face-alist))
+	     (error "Face %s not configured for %s mode" face mode-name))))
   (set (make-local-variable 'facemenu-end-add-face) "}")
   (set (make-local-variable 'facemenu-remove-face-function) t)
   (set (make-local-variable 'font-lock-defaults)