[Top][All Lists]
[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: |
Richard Stallman |
Subject: |
Re: problem with mh-e and 2002-08-20 change to font-core.el |
Date: |
Sun, 01 Sep 2002 09:15:17 -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.
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
inconsistency that you pointed out, that the font-lock-face properties
won't be cleared unless someone actually turned on font-lock-mode.
Everything will work right except cases like switching to Occur mode,
and those cases are not worth a lot of work to fix.
- Re: problem with mh-e and 2002-08-20 change to font-core.el,
Richard Stallman <=