# HG changeset patch # User aidan # Date 1115312141 0 # Node ID f441e940eed876018bbc17ee0c55908a77412013 # Parent 84e58d54ba89e120905f51690c9c4f782b9350fd [xemacs-hg @ 2005-05-05 16:55:39 by aidan] Make *scratch* honour user's font lock settings. diff -r 84e58d54ba89 -r f441e940eed8 lisp/ChangeLog --- a/lisp/ChangeLog Wed May 04 21:51:38 2005 +0000 +++ b/lisp/ChangeLog Thu May 05 16:55:41 2005 +0000 @@ -1,3 +1,8 @@ +2005-05-05 Aidan Kehoe + + * startup.el (command-line): Call font-lock-set-defaults to make + the user's choice of fontification take effect in *scratch*. + 2005-04-12 Mike Sperber * minibuf.el (get-user-response): Move here from dialog.el so it diff -r 84e58d54ba89 -r f441e940eed8 lisp/startup.el --- a/lisp/startup.el Wed May 04 21:51:38 2005 +0000 +++ b/lisp/startup.el Thu May 05 16:55:41 2005 +0000 @@ -755,7 +755,22 @@ ;; (insert initial-scratch-message) (set-buffer-modified-p nil) (when (eq major-mode 'fundamental-mode) - (funcall initial-major-mode))) + (funcall initial-major-mode)) + ;; The docstring for font-lock-set-defaults says that major modes that + ;; have any font-lock defaults specified should call the function + ;; after initialising the `major-mode' variable. None of them do, + ;; however, and any font locking that is ever put in place is done as + ;; a result of `font-lock-set-defaults' being in find-file-hook and + ;; various other places. We could make *scratch* honour the user's + ;; choice of whether font-locking is in place by adding a call to + ;; font-lock-set-defaults in `lisp-interaction-mode'; but that'll + ;; break if `intial-major-mode' is anything else. + ;; + ;; So, despite what `font-lock-set-defaults'' docstring says, this + ;; *is* where we should call it to have the user's choice of font-lock + ;; level take effect in *scratch*. If the modes are rewritten to do + ;; the right then, we're okay too, the function is idempotent. + (font-lock-set-defaults)) ;; Load library for our terminal type. ;; User init file can set term-file-prefix to nil to prevent this.