summaryrefslogtreecommitdiff
path: root/lisp/font-lock.el
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>2008-02-24 10:09:07 +0000
committerMiles Bader <miles@gnu.org>2008-02-24 10:09:07 +0000
commitb03f96dc5a6651d1dc84b81b2a15cad6908b9809 (patch)
tree699d727fdfb007a12a07d1e1f2e172617cc159ef /lisp/font-lock.el
parent52bec650ae314402c242ce700bb09be42ef8ae55 (diff)
parent20ca5ee4f7d897d79416a6fdd084db1eabb392b0 (diff)
downloademacs-b03f96dc5a6651d1dc84b81b2a15cad6908b9809.tar.gz
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-1074
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r--lisp/font-lock.el18
1 files changed, 11 insertions, 7 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index 2f2659a6e1c..7d607b3a52d 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -1785,13 +1785,16 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(cdr-safe (assq major-mode font-lock-removed-keywords-alist))))
(set (make-local-variable 'font-lock-defaults) defaults)
;; Syntactic fontification?
- (when (nth 1 defaults)
- (set (make-local-variable 'font-lock-keywords-only) t))
+ (if (nth 1 defaults)
+ (set (make-local-variable 'font-lock-keywords-only) t)
+ (kill-local-variable 'font-lock-keywords-only))
;; Case fold during regexp fontification?
- (when (nth 2 defaults)
- (set (make-local-variable 'font-lock-keywords-case-fold-search) t))
+ (if (nth 2 defaults)
+ (set (make-local-variable 'font-lock-keywords-case-fold-search) t)
+ (kill-local-variable 'font-lock-keywords-case-fold-search))
;; Syntax table for regexp and syntactic fontification?
- (when (nth 3 defaults)
+ (if (null (nth 3 defaults))
+ (kill-local-variable 'font-lock-syntax-table)
(set (make-local-variable 'font-lock-syntax-table)
(copy-syntax-table (syntax-table)))
(dolist (selem (nth 3 defaults))
@@ -1802,9 +1805,10 @@ Sets various variables using `font-lock-defaults' (or, if nil, using
(mapcar 'identity (car selem))))
(modify-syntax-entry char syntax font-lock-syntax-table)))))
;; Syntax function for syntactic fontification?
- (when (nth 4 defaults)
+ (if (nth 4 defaults)
(set (make-local-variable 'font-lock-beginning-of-syntax-function)
- (nth 4 defaults)))
+ (nth 4 defaults))
+ (kill-local-variable 'font-lock-beginning-of-syntax-function))
;; Variable alist?
(dolist (x (nthcdr 5 defaults))
(set (make-local-variable (car x)) (cdr x)))