Mercurial > hg > xemacs-beta
changeset 2756:f441e940eed8
[xemacs-hg @ 2005-05-05 16:55:39 by aidan]
Make *scratch* honour user's font lock settings.
author | aidan |
---|---|
date | Thu, 05 May 2005 16:55:41 +0000 |
parents | 84e58d54ba89 |
children | 7844ab77b582 |
files | lisp/ChangeLog lisp/startup.el |
diffstat | 2 files changed, 21 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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 <kehoea@parhasard.net> + + * 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 <mike@xemacs.org> * minibuf.el (get-user-response): Move here from dialog.el so it
--- 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.