From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dan Nicolaescu Newsgroups: gmane.emacs.devel Subject: Re: Global Font Lock by default Date: Wed, 02 Nov 2005 14:51:52 -0800 Message-ID: <200511022251.jA2MpsKN006984@scanner2.ics.uci.edu> References: <200510311648.j9VGmgKN020532@scanner2.ics.uci.edu> <878xw9r3tu.fsf@pacem.orebokech.com> <200510311747.j9VHl2KN024250@scanner2.ics.uci.edu> <871x21r0v6.fsf@pacem.orebokech.com> <200510312048.j9VKm8KN006460@scanner2.ics.uci.edu> <87r7a1pf1h.fsf@pacem.orebokech.com> <200510312124.j9VLO7KN008775@scanner2.ics.uci.edu> <87ll09pd8v.fsf@pacem.orebokech.com> <200510312207.j9VM79KN011654@scanner2.ics.uci.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1130972089 21873 80.91.229.2 (2 Nov 2005 22:54:49 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 2 Nov 2005 22:54:49 +0000 (UTC) Cc: romain@orebokech.com, emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Nov 02 23:54:48 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1EXRTB-0005yJ-Ul for ged-emacs-devel@m.gmane.org; Wed, 02 Nov 2005 23:52:38 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EXRTB-0005bC-H1 for ged-emacs-devel@m.gmane.org; Wed, 02 Nov 2005 17:52:37 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1EXRT3-0005ax-S0 for emacs-devel@gnu.org; Wed, 02 Nov 2005 17:52:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1EXRT3-0005al-EX for emacs-devel@gnu.org; Wed, 02 Nov 2005 17:52:29 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1EXRT3-0005ai-Bs for emacs-devel@gnu.org; Wed, 02 Nov 2005 17:52:29 -0500 Original-Received: from [128.195.1.36] (helo=scanner2.ics.uci.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1EXRT2-0003nf-JR; Wed, 02 Nov 2005 17:52:28 -0500 Original-Received: from vino.ics.uci.edu (dann@vino.ics.uci.edu [128.195.11.198]) by scanner2.ics.uci.edu (8.12.10/8.12.10) with ESMTP id jA2MpsKN006984; Wed, 2 Nov 2005 14:51:54 -0800 (PST) Original-To: rms@gnu.org Original-Lines: 42 X-ICS-MailScanner: Found to be clean X-ICS-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (score=-99.4, required 5, J_CHICKENPOX_52, USER_IN_WHITELIST) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:45322 Archived-At: "Richard M. Stallman" writes: > later at run time face-spec-choose is called this will match: > "((class color) (min-colors 8) (background light))" > but because it specifies no properties face-spec-set returns > nil => face-spec-reset-face is not called in face-spec-set => the bold > and italic attributes are kept... > > That seems to be a bug in the general mechanism. > Any defface should have the same meaning, if preloaded, > as it would have if not preloaded. In particular, > any fallback option which would not apply at run time > should not ultimately apply when preloaded. > > Therefore, either (t (:weight bold :slant italic)) should not > be applied during preload, or it should be overridden at start-up. I think that the patch below to face-spec-set is the right thing to do. FACE needs to be reset even whe `face-choose-set' returns nil, but according to the docstring it should not be reset if SPEC is nil. *** faces.el 01 Nov 2005 15:50:50 -0800 1.340 --- faces.el 02 Nov 2005 14:17:35 -0800 *************** *** 1448,1454 **** do it on all frames. See `defface' for information about SPEC. If SPEC is nil, do nothing." (let ((attrs (face-spec-choose spec frame))) ! (when attrs (face-spec-reset-face face frame)) (while attrs (let ((attribute (car attrs)) --- 1448,1454 ---- do it on all frames. See `defface' for information about SPEC. If SPEC is nil, do nothing." (let ((attrs (face-spec-choose spec frame))) ! (when spec (face-spec-reset-face face frame)) (while attrs (let ((attribute (car attrs))