auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] Changes to auctex/font-latex.el,v


From: Ralf Angeli
Subject: [AUCTeX-diffs] Changes to auctex/font-latex.el,v
Date: Sun, 19 Aug 2007 17:26:54 +0000

CVSROOT:        /cvsroot/auctex
Module name:    auctex
Changes by:     Ralf Angeli <angeli>    07/08/19 17:26:54

Index: font-latex.el
===================================================================
RCS file: /cvsroot/auctex/auctex/font-latex.el,v
retrieving revision 5.172
retrieving revision 5.173
diff -u -b -r5.172 -r5.173
--- font-latex.el       25 May 2007 21:09:01 -0000      5.172
+++ font-latex.el       19 Aug 2007 17:26:54 -0000      5.173
@@ -757,6 +757,27 @@
     (add-to-list 'font-latex-keywords-2 item t)))
 (font-latex-make-user-keywords)
 
+(defun font-latex-add-keywords (keywords class)
+  "Add KEYWORDS to CLASS.
+KEYWORDS is a list of keywords or keywords with syntax specs.
+CLASS corresponds to a keyword class and can be one of the
+symbols 'warning, 'variable, 'reference, 'function, sectioning-0,
+'sectioning-1, 'sectioning-2, 'sectioning-3, 'sectioning-4,
+'sectioning-5, 'slide-title, 'textual, 'bold-command,
+'italic-command, 'math-command, 'type-command, 'bold-declaration,
+'italic-declaration or 'type-declaration.
+
+The keywords will be added to the buffer-local list of keywords
+of the respective keyword class and necessary updates of the font
+locking machinery will be triggered."
+  (let* ((class (symbol-name class))
+        (list (intern (format "font-latex-match-%s-keywords-local" class))))
+    (dolist (elt keywords)
+      (add-to-list list elt))
+    (funcall (intern (format "font-latex-match-%s-make" class)))
+    (setq font-lock-set-defaults nil)
+    (font-lock-set-defaults)))
+
 (defvar font-latex-keywords font-latex-keywords-1
   "Default expressions to highlight in TeX mode.")
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]