From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Richard Stallman Newsgroups: gmane.emacs.devel Subject: Re: problem with mh-e and 2002-08-20 change to font-core.el Date: Sun, 01 Sep 2002 09:15:17 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: References: <200208260738.g7Q7c8S23362@localhost.localdomain> <200208262151.g7QLpN812743@wijiji.santafe.edu> <200208262209.g7QM9cx26500@rum.cs.yale.edu> <200208280653.g7S6r4p13393@wijiji.santafe.edu> <200208281355.g7SDtUl03773@rum.cs.yale.edu> <200208291525.g7TFPgG10906@rum.cs.yale.edu> <200208301342.g7UDgng18121@rum.cs.yale.edu> Reply-To: rms@gnu.org NNTP-Posting-Host: localhost.gmane.org X-Trace: main.gmane.org 1030886206 7057 127.0.0.1 (1 Sep 2002 13:16:46 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sun, 1 Sep 2002 13:16:46 +0000 (UTC) Cc: monnier+gnu/emacs@rum.cs.yale.edu, y@mit.edu, mh-e-devel@lists.sourceforge.net, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 17lUaq-0001pi-00 for ; Sun, 01 Sep 2002 15:16:44 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17lV8a-0006jK-00 for ; Sun, 01 Sep 2002 15:51:37 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17lUcI-0004Pt-00; Sun, 01 Sep 2002 09:18:15 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17lUZZ-0003vI-00 for emacs-devel@gnu.org; Sun, 01 Sep 2002 09:15:25 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17lUZS-0003rz-00 for emacs-devel@gnu.org; Sun, 01 Sep 2002 09:15:22 -0400 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by monty-python.gnu.org with esmtp (Exim 4.10) id 17lUZR-0003ri-00 for emacs-devel@gnu.org; Sun, 01 Sep 2002 09:15:17 -0400 Original-Received: from rms by fencepost.gnu.org with local (Exim 4.10) id 17lUZR-0006Ml-00; Sun, 01 Sep 2002 09:15:17 -0400 Original-To: monnier+gnu/emacs@rum.cs.yale.edu In-Reply-To: <200208301342.g7UDgng18121@rum.cs.yale.edu> (monnier+gnu/emacs@rum.cs.yale.edu) Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:7252 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:7252 > 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.