emacs-devel
[Top][All Lists]
Advanced

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

Re: problem with mh-e and 2002-08-20 change to font-core.el


From: Stefan Monnier
Subject: Re: problem with mh-e and 2002-08-20 change to font-core.el
Date: Mon, 02 Sep 2002 13:05:15 -0400

>     > With the current code, changing from Occur mode to Fundamental mode
>     > and back to Occur mode would lose the font-lock-face properties.
>     > That is a bug.
>     > 
>     > With the change you propose, changing from Occur mode to Fundamental
>     > mode and then to Info mode would leave you with font-lock-face
>     > properties left over from Occur mode.  That would be a bug.
> 
>     I'm not sure how important this is, really.
> 
> It isn't worth a large amount of work.
> 
>     but that might be run too late.  So maybe we should add some
>     support in font-core.el to make it easier for a mode to tell
>     "erase font-lock-face property when font-lock-mode is changed".
> 
> The whole point of the font-lock-face property is that it can be set
> up unconditionally, and is there regardless of whether Font-Lock mode
> is enabled.  It would be wrong to remove these properties when turning
> off Font-Lock mode.  Only changing the major mode is a reason to
> remove them.

Good point.

>     First, I think that the change-major-mode-hook should
>     run (font-lock-mode -1) and that if it doesn't do the right thing,
>     then we should fix (font-lock-mode -1) rather than change
>     the change-major-mode-hook.
> 
> For the reason given above, this is simply wrong.
> 
> Perhaps the modes that use font-lock-face should set up
> change-major-mode-hook to clear it out.  That would solve the

Agreed.


        Stefan





reply via email to

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