152 |
;; "Default expressions to highlight in Foo mode.") |
;; "Default expressions to highlight in Foo mode.") |
153 |
;; |
;; |
154 |
;; (add-hook 'foo-mode-hook |
;; (add-hook 'foo-mode-hook |
155 |
;; (function (lambda () |
;; (lambda () |
156 |
;; (make-local-variable 'font-lock-defaults) |
;; (make-local-variable 'font-lock-defaults) |
157 |
;; (setq font-lock-defaults '(foo-font-lock-keywords t))))) |
;; (setq font-lock-defaults '(foo-font-lock-keywords t)))) |
158 |
|
|
159 |
;;; Adding Font Lock support for modes: |
;;; Adding Font Lock support for modes: |
160 |
|
|
1465 |
(when (nth 4 defaults) |
(when (nth 4 defaults) |
1466 |
(set (make-local-variable 'font-lock-beginning-of-syntax-function) |
(set (make-local-variable 'font-lock-beginning-of-syntax-function) |
1467 |
(nth 4 defaults))) |
(nth 4 defaults))) |
1468 |
;; Variable alist? |
;; The variable alist is set in font-core.el. |
1469 |
(dolist (x (nthcdr 5 defaults)) |
|
|
(set (make-local-variable (car x)) (cdr x))) |
|
1470 |
;; Setup `font-lock-keywords' last because its value might depend |
;; Setup `font-lock-keywords' last because its value might depend |
1471 |
;; on other settings (e.g. font-lock-compile-keywords uses |
;; on other settings (e.g. font-lock-compile-keywords uses |
1472 |
;; font-lock-beginning-of-syntax-function). |
;; font-lock-beginning-of-syntax-function). |