1 |
;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands -*- coding: utf-8 -*- |
;;; tex-mode.el --- TeX, LaTeX, and SliTeX mode commands -*- coding: utf-8 -*- |
2 |
|
|
3 |
;; Copyright (C) 1985, 1986, 1989, 1992, 1994, 1995, 1996, 1997, 1998, 1999, |
;; Copyright (C) 1985, 1986, 1989, 1992, 1994, 1995, 1996, 1997, 1998, 1999, |
4 |
;; 2002, 2003, 2004 Free Software Foundation, Inc. |
;; 2002, 2003, 2004, 2005 Free Software Foundation, Inc. |
5 |
|
|
6 |
;; Maintainer: FSF |
;; Maintainer: FSF |
7 |
;; Keywords: tex |
;; Keywords: tex |
602 |
;; degenerate to nasty complexity (because we try to match the |
;; degenerate to nasty complexity (because we try to match the |
603 |
;; closing brace, which forces trying all matching combinations). |
;; closing brace, which forces trying all matching combinations). |
604 |
(arg "{\\(?:[^{}\\]\\|\\\\.\\|{[^}]*}\\)*")) |
(arg "{\\(?:[^{}\\]\\|\\\\.\\|{[^}]*}\\)*")) |
605 |
`((,(concat "[_^] *\\([^\n\\{}]\\|" slash general "\\|" arg "}\\)") |
`((,(concat "[_^] *\\([^\n\\{}#]\\|" slash general "\\|#[0-9]\\|" arg "}\\)") |
606 |
(1 (tex-font-lock-suscript (match-beginning 0)) |
(1 (tex-font-lock-suscript (match-beginning 0)) |
607 |
append)))))) |
append)))))) |
608 |
"Experimental expressions to highlight in TeX modes.") |
"Experimental expressions to highlight in TeX modes.") |
1027 |
'tex-categorize-whitespace) |
'tex-categorize-whitespace) |
1028 |
(set (make-local-variable 'facemenu-add-face-function) |
(set (make-local-variable 'facemenu-add-face-function) |
1029 |
(lambda (face end) |
(lambda (face end) |
1030 |
(let ((face-text (cdr (assq face tex-face-alist)))) |
(or (cdr (assq face tex-face-alist)) |
1031 |
(if face-text |
(error "Face %s not configured for %s mode" face mode-name)))) |
|
face-text |
|
|
(error "Face %s not configured for %s mode" face mode-name))))) |
|
1032 |
(set (make-local-variable 'facemenu-end-add-face) "}") |
(set (make-local-variable 'facemenu-end-add-face) "}") |
1033 |
(set (make-local-variable 'facemenu-remove-face-function) t) |
(set (make-local-variable 'facemenu-remove-face-function) t) |
1034 |
(set (make-local-variable 'font-lock-defaults) |
(set (make-local-variable 'font-lock-defaults) |