- ;; Change from (HIGH LOW) for back compatibility. Remove for version 3!
- (when (consp (cdr-safe timestamp))
- (setcdr timestamp (nth 1 timestamp)))
- ;; Compile KEYWORDS and `font-lock-keywords' in case one is and one isn't.
- (let ((current font-lock-keywords))
- (setq keywords (font-lock-compile-keywords keywords)
- font-lock-keywords (font-lock-compile-keywords current)))
- ;; Use the Font Lock cache PROPERTIES if we're using cache VERSION format 2,
- ;; the current buffer's file timestamp matches the TIMESTAMP, and the current
- ;; buffer's font-lock-keywords are the same as KEYWORDS.
+ ;; Find value of syntactic keywords in case it is a symbol.
+ (setq font-lock-syntactic-keywords (font-lock-eval-keywords
+ font-lock-syntactic-keywords))
+ ;; Compile all keywords in case some are and some aren't.
+ (when font-lock-syntactic-keywords
+ (setq font-lock-syntactic-keywords (font-lock-compile-keywords
+ font-lock-syntactic-keywords)))
+ (when syntactic-keywords
+ (setq syntactic-keywords (font-lock-compile-keywords syntactic-keywords)))
+ (setq font-lock-keywords (font-lock-compile-keywords font-lock-keywords)
+ keywords (font-lock-compile-keywords keywords))
+ ;; Use the Font Lock cache SYNTACTIC-PROPERTIES and FACE-PROPERTIES if we're
+ ;; using cache VERSION format 3, the current buffer's file timestamp matches
+ ;; the TIMESTAMP, the current buffer's `font-lock-syntactic-keywords' are the
+ ;; same as SYNTACTIC-KEYWORDS, and the current buffer's `font-lock-keywords'
+ ;; are the same as KEYWORDS.