;;; font-lock.el --- Electric font lock mode
-;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999
+;; Copyright (C) 1992, 93, 94, 95, 96, 97, 98, 1999, 2000
;; Free Software Foundation, Inc.
-;; Author: jwz, then rms, then sm <simon@gnu.org>
+;; Author: jwz, then rms, then sm
;; Maintainer: FSF
;; Keywords: languages, faces
(MATCH SYNTAX OVERRIDE LAXMATCH)
-where SYNTAX can be of the form (SYNTAX-CODE . MATCHING-CHAR), the name of a
-syntax table, or an expression whose value is such a form or a syntax table.
-OVERRIDE cannot be `prepend' or `append'.
+where SYNTAX can be of the form (SYNTAX-CODE . MATCHING-CHAR) (see
+also `string-to-syntax'), the name of a syntax table, or an expression
+whose value is such a form or a syntax table. OVERRIDE cannot be
+`prepend' or `append'.
For example, an element of the form highlights syntactically:
(start (match-beginning match)) (end (match-end match))
(value (nth 1 highlight))
(override (nth 2 highlight)))
- (unless (numberp (car-safe value))
- (setq value (eval value)))
+ (cond ((stringp value)
+ (setq value (string-to-syntax value)))
+ ((not (numberp (car-safe value)))
+ (setq value (eval value))))
(cond ((not start)
;; No match but we might not signal an error.
(or (nth 3 highlight)
;; Function declarations.
"\\(advice\\|alias\\|generic\\|macro\\*?\\|method\\|"
"setf\\|subst\\*?\\|un\\*?\\|"
- "ine-\\(condition\\|derived-mode\\|function\\|"
+ "ine-\\(condition\\|\\(?:derived\\|minor\\)-mode\\|"
"method-combination\\|setf-expander\\|skeleton\\|widget\\|"
- "\\(compiler\\|modify\\|symbol\\)-macro\\)\\)\\|"
+ "function\\|\\(compiler\\|modify\\|symbol\\)-macro\\)\\)\\|"
;; Variable declarations.
"\\(const\\(ant\\)?\\|custom\\|face\\|parameter\\|var\\)\\|"
;; Structure declarations.