diff options
| author | Chong Yidong | 2005-11-12 17:17:52 +0000 |
|---|---|---|
| committer | Chong Yidong | 2005-11-12 17:17:52 +0000 |
| commit | 71dd9295e32625af37aeafeb1e620ec75b0aedc9 (patch) | |
| tree | 8e430b68c3220075bffe832d4a90e1ab6b73c8e0 | |
| parent | b5cf3adf5c7202eae81fd525384b68379c33a7fa (diff) | |
| download | emacs-71dd9295e32625af37aeafeb1e620ec75b0aedc9.tar.gz emacs-71dd9295e32625af37aeafeb1e620ec75b0aedc9.zip | |
* hi-lock.el (hi-lock-mode): Set the default value of
font-lock-defaults.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/hi-lock.el | 10 |
2 files changed, 13 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 7fb02fa571d..eca2a8f6b77 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2005-11-12 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * hi-lock.el (hi-lock-mode): Set the default value of | ||
| 4 | font-lock-defaults. | ||
| 5 | |||
| 1 | 2005-11-11 Luc Teirlinck <teirllm@auburn.edu> | 6 | 2005-11-11 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 7 | ||
| 3 | * find-lisp.el (find-lisp-find-dired-insert-file): Pass `string' | 8 | * find-lisp.el (find-lisp-find-dired-insert-file): Pass `string' |
diff --git a/lisp/hi-lock.el b/lisp/hi-lock.el index 84a8cd6284e..63f7611bd52 100644 --- a/lisp/hi-lock.el +++ b/lisp/hi-lock.el | |||
| @@ -304,8 +304,10 @@ is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'." | |||
| 304 | (when (and (not hi-lock-mode-prev) hi-lock-mode) | 304 | (when (and (not hi-lock-mode-prev) hi-lock-mode) |
| 305 | (add-hook 'find-file-hook 'hi-lock-find-file-hook) | 305 | (add-hook 'find-file-hook 'hi-lock-find-file-hook) |
| 306 | (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook) | 306 | (add-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook) |
| 307 | (when (eq nil font-lock-defaults) | 307 | (if (null (default-value 'font-lock-defaults)) |
| 308 | (setq font-lock-defaults '(nil))) | 308 | (setq-default font-lock-defaults '(nil))) |
| 309 | (if (null font-lock-defaults) | ||
| 310 | (setq font-lock-defaults '(nil))) | ||
| 309 | (unless font-lock-mode | 311 | (unless font-lock-mode |
| 310 | (font-lock-mode 1)) | 312 | (font-lock-mode 1)) |
| 311 | (define-key-after menu-bar-edit-menu [hi-lock] | 313 | (define-key-after menu-bar-edit-menu [hi-lock] |
| @@ -322,6 +324,10 @@ is found. A mode is excluded if it's in the list `hi-lock-exclude-modes'." | |||
| 322 | (setq hi-lock-interactive-patterns nil | 324 | (setq hi-lock-interactive-patterns nil |
| 323 | hi-lock-file-patterns nil) | 325 | hi-lock-file-patterns nil) |
| 324 | (when font-lock-mode (hi-lock-refontify))))) | 326 | (when font-lock-mode (hi-lock-refontify))))) |
| 327 | |||
| 328 | (let ((fld (default-value 'font-lock-defaults))) | ||
| 329 | (if (and fld (listp fld) (null (car fld))) | ||
| 330 | (setq-default font-lock-defaults (cdr fld)))) | ||
| 325 | (define-key-after menu-bar-edit-menu [hi-lock] nil) | 331 | (define-key-after menu-bar-edit-menu [hi-lock] nil) |
| 326 | (remove-hook 'find-file-hook 'hi-lock-find-file-hook) | 332 | (remove-hook 'find-file-hook 'hi-lock-find-file-hook) |
| 327 | (remove-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook)))) | 333 | (remove-hook 'font-lock-mode-hook 'hi-lock-font-lock-hook)))) |