emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Global Font Lock by default


From: Luc Teirlinck
Subject: Re: Global Font Lock by default
Date: Tue, 1 Nov 2005 11:19:26 -0600 (CST)

Kim Storm wrote:

   Both versions should work, it's just a matter of deciding when is
   better to turn on global-font-lock-mode: at run time or at dump time.
   Opinions? 

   (I'm inclined to believe is better to do as much work as possible at
   dump time)

I have not yet had the time to look at this in full detail, but I do
not believe that any of these two versions will work.  I believe that
both will give problems when the user selects "Erase Customization" in
a custom buffer.  I believe that the correct way to this is to pass

:initialize 'custom-initialize-safe-default

and the desired :initial value to the `easy-mmode-define-global-mode'
call at the end of "font-core.el".  The :initial-value should be set
to the exact default, given initial options and the like.  "font-core"
is loaded before startup, but custom-initialize-safe-default will
prevent the :init-value to be executed at that stage, so you do not
need to worry about variables used in the :init-value not yet being
defined then.  Then you do

(custom-reevaluate-setting 'global-font-lock-mode)

in startup.el.  This will execute the :init-value when all the initial
options and stuff are known.

Sincerely,

Luc.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]