diff options
author | Richard M. Stallman <rms@gnu.org> | 1996-06-17 00:06:46 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1996-06-17 00:06:46 +0000 |
commit | 18cf1bec9e96a4122a74ef4cf465522254e864e6 (patch) | |
tree | f8ebcc96681f9acbaa0a6d189ac5ecae826792d6 /lisp/font-lock.el | |
parent | 2cc719cd737b0846848bd681cfbccd1e23964393 (diff) | |
download | emacs-18cf1bec9e96a4122a74ef4cf465522254e864e6.tar.gz |
(global-font-lock-mode): Set up find-file-hooks.
(font-lock-default-fontify-buffer, font-lock-fontify-block)
(font-lock-mode): Fix syntax of msgs such as Fontifying...done.
Diffstat (limited to 'lisp/font-lock.el')
-rw-r--r-- | lisp/font-lock.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/font-lock.el b/lisp/font-lock.el index 33ba04dc41a..388efef6d6c 100644 --- a/lisp/font-lock.el +++ b/lisp/font-lock.el @@ -457,7 +457,7 @@ syntactic change on other lines, you can use \\[font-lock-fontify-block]." 'font-lock-fontify-buffer-function)))) (font-lock-fontify-buffer)) (font-lock-verbose - (message "Fontifying %s... buffer too big." (buffer-name))))) + (message "Fontifying %s...buffer too big" (buffer-name))))) (font-lock-fontified (font-lock-unfontify-buffer) (remove-hook 'before-revert-hook 'font-lock-revert-setup t) @@ -546,6 +546,9 @@ turned on in a buffer if its major mode is one of `font-lock-global-modes'." (remove-hook 'change-major-mode-hook 'font-lock-change-major-mode) (add-hook 'change-major-mode-hook 'font-lock-change-major-mode) (add-hook 'post-command-hook 'turn-on-font-lock-if-enabled) + ;; This is to make sure we fontify immediately + ;; when process filters (such as GUD) find files. + (add-hook 'find-file-hooks 'turn-on-font-lock-if-enabled) (setq font-lock-buffers (buffer-list))) (if message (message "Global Font Lock mode is now %s." (if off-p "OFF" "ON"))) @@ -611,7 +614,7 @@ turned on in a buffer if its major mode is one of `font-lock-global-modes'." (setq font-lock-fontified t))) ;; We don't restore the old fontification, so it's best to unfontify. (quit (font-lock-unfontify-buffer)))) - (if verbose (message "Fontifying %s... %s." (buffer-name) + (if verbose (message "Fontifying %s...%s" (buffer-name) (if font-lock-fontified "done" "aborted"))))) (defun font-lock-default-unfontify-buffer () @@ -690,7 +693,7 @@ delimit the region to fontify." (save-excursion (forward-line lines) (point)))) (funcall font-lock-mark-block-function) (font-lock-fontify-region (point) (mark))) - ((error quit) (message "Fontifying block... %s" error-data))))))) + ((error quit) (message "Fontifying block...%s" error-data))))))) (define-key facemenu-keymap "\M-g" 'font-lock-fontify-block) |