From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: trentbuck@gmail.com Newsgroups: gmane.emacs.bugs Subject: bug#4988: 23.1; In Emacs 23, face-spec-set amends instead of setting Date: Fri, 20 Nov 2009 06:28:16 -0800 (PST) Message-ID: <4b06a780.101abc0a.1dcd.395d@mx.google.com> Reply-To: trentbuck@gmail.com, 4988@emacsbugs.donarmstrong.com NNTP-Posting-Host: lo.gmane.org X-Trace: ger.gmane.org 1258728464 20364 80.91.229.12 (20 Nov 2009 14:47:44 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 20 Nov 2009 14:47:44 +0000 (UTC) To: bug-gnu-emacs@gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Nov 20 15:47:37 2009 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1NBUlq-0003yH-7t for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Nov 2009 15:47:34 +0100 Original-Received: from localhost ([127.0.0.1]:57964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBUlp-0005zE-J9 for geb-bug-gnu-emacs@m.gmane.org; Fri, 20 Nov 2009 09:47:33 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBUll-0005z0-49 for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 09:47:29 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBUlg-0005yE-F5 for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 09:47:28 -0500 Original-Received: from [199.232.76.173] (port=50988 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBUlg-0005yB-9A for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 09:47:24 -0500 Original-Received: from rzlab.ucr.edu ([138.23.92.77]:46993) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1NBUlf-0002cn-GT for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 09:47:23 -0500 Original-Received: from rzlab.ucr.edu (rzlab.ucr.edu [127.0.0.1]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAKElLPK017421; Fri, 20 Nov 2009 06:47:21 -0800 Original-Received: (from debbugs@localhost) by rzlab.ucr.edu (8.14.3/8.14.3/Submit) id nAKEZ4PU016252; Fri, 20 Nov 2009 06:35:04 -0800 Resent-Date: Fri, 20 Nov 2009 06:35:04 -0800 X-Loop: owner@emacsbugs.donarmstrong.com Resent-From: trentbuck@gmail.com Resent-To: bug-submit-list@donarmstrong.com Resent-CC: Emacs Bugs 2Resent-Date: Fri, 20 Nov 2009 14:35:03 +0000 Resent-Message-ID: Resent-Sender: owner@emacsbugs.donarmstrong.com X-Emacs-PR-Message: report 4988 X-Emacs-PR-Package: emacs X-Emacs-PR-Keywords: Original-Received: via spool by submit@emacsbugs.donarmstrong.com id=B.125872731115748 (code B ref -1); Fri, 20 Nov 2009 14:35:03 +0000 Original-Received: (at submit) by emacsbugs.donarmstrong.com; 20 Nov 2009 14:28:31 +0000 X-Spam-Bayes: score:0.5 Bayes not run. spammytokens:Tokens not available. hammytokens:Tokens not available. Original-Received: from lists.gnu.org (lists.gnu.org [199.232.76.165]) by rzlab.ucr.edu (8.14.3/8.14.3/Debian-5) with ESMTP id nAKESSaw015745 for ; Fri, 20 Nov 2009 06:28:30 -0800 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NBUTM-0000I5-6n for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 09:28:28 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NBUTG-00005F-MA for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 09:28:26 -0500 Original-Received: from [199.232.76.173] (port=36167 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NBUTG-0008W9-G3 for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 09:28:22 -0500 Original-Received: from mail-bw0-f215.google.com ([209.85.218.215]:39048) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NBUTE-0006tN-Ia for bug-gnu-emacs@gnu.org; Fri, 20 Nov 2009 09:28:21 -0500 Original-Received: by bwz7 with SMTP id 7so3670597bwz.26 for ; Fri, 20 Nov 2009 06:28:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject; bh=zQMoOqX1o7hZJ3AZfPYT6loJXSj//2BWRl6TkcnEYGg=; b=dGpPHxKFOcZB+zKiO2sBKDZkf7QQP+bjn4nicW/Uo5ldY3x6TFgJ9HpdH8vVQl0Pv3 g06IBGiI08lVwtKuTEAxD6j0mdTOknwR4zD7yPYu9H9Sx/m5VWdnaYOlVlS4Ws1Atg6W GNv1y5CaXqU/3NGi4dNlsSP7Qxqkg2B25A8AM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject; b=kr60RZyN95P6/BC0EklHvjXqoN0oDt6Mf5ypk4WUMZI7z7snJv1UcWtS1QvFrkY9q3 UIjkYhU8zplTyTHGKoZlt2j//AzqlhVgXkKfO9fzXJWq8zEGukcUgJtu3vUQ9owVCs2h UFlvGLNYI+GMD15cOsTwdlS98lnnnX6FuWj8I= Original-Received: by 10.204.7.195 with SMTP id e3mr1439194bke.118.1258727297726; Fri, 20 Nov 2009 06:28:17 -0800 (PST) Original-Received: from localhost (nat064.cyber.com.au [203.7.155.64]) by mx.google.com with ESMTPS id 16sm437126bwz.3.2009.11.20.06.28.14 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 20 Nov 2009 06:28:16 -0800 (PST) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Resent-Date: Fri, 20 Nov 2009 09:47:28 -0500 X-BeenThere: bug-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:32770 Archived-At: In Emacs 22, (face-spec-set 'ido-subdir '((t :inherit dired-directory))) sets the ido-subdir face. In Emacs 23, the same form merely amends the defface spec -- the defface's :foreground "red" property isn't unset. This problem has existed for a long time; until recently I was working around it with filthy kludges of the form (put 'ido-subdir 'face-alias 'dired-directory) Today, I wanted to make w3m-anchor inherit from the 'link face, but to override :underline. So I tried this, and rediscovered the problem. (face-spec-set 'w3m-anchor '((t :inherit link :underline nil))) The elisp code below, when loaded by emacs -Q, demonstrates the problem (by taking snapshots of customize-face's rendering of the face after each attempt). I apologize for the ranting below. By this point, I am sick of trying to wade through all this new 'theme-foo crap that manages to make the face subsystem even more obtuse and confusing than it already was. ;; Goal: to completely destory upstream's ido-subdir's spec and ;; replace it with a simple (t :inherit 'dired-directory). ;; ;; Load this with emacs -Q -l example.el (require 'dired) (require 'ido) (defun snapshot (description) (customize-face 'ido-subdir) (search-forward "Attributes: ") (kill-ring-save (point-at-bol) (point-max)) (switch-to-buffer "*scratch*") (insert description) (insert "\n") (yank) (insert "\n")) (snapshot "Before doing anything") (face-spec-set 'ido-subdir '((t :inherit dired-directory)) t) (snapshot "face-spec-set with FOR-DEFFACE does nothing. Just checking...") (face-spec-set 'ido-subdir '((t :inherit dired-directory))) (snapshot "face-spec-set without FOR-DEFFACE *amends* in Emacs 23, whereas in Emacs 22 it used to work as advertised -- it *set* the face!") (face-spec-reset-face 'ido-subdir) (face-spec-set 'ido-subdir '((t :inherit dired-directory))) (snapshot "Does a face-spec-RESET-face work? No!") (custom-set-faces '(ido-subdir ((t :inherit dired-directory)))) (snapshot "CUSTOM-SET-FACES works (if you comment out the previous attempts above), but it's aesthetically ugly to have multiple C-S-F calls in my .emacs. Nor do I want to sort my .emacs configuration by the kind of variables I set -- foo face configuration belongs with foo variable configuration and foo helper functions.") (face-spec-set 'ido-subdir '((t :foreground nil :inherit dired-directory))) (snapshot "Yes, I can use :foreground nil, but to do so, I need to know that upstream is using :foreground and not something else. Am I expected to use :foo nil for *ALL* properties, in case upstream decides to set another property in the next release?!") In GNU Emacs 23.1.1 (i486-pc-linux-gnu) of 2009-09-14 on raven, modified by Debian configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/23.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/site-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=no' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: C value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_AU.utf8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: rcirc Minor modes in effect: shell-dirtrack-mode: t rcirc-low-priority-flag: t rcirc-omit-mode: t diff-auto-refine-mode: t rcirc-track-minor-mode: t xterm-mouse-mode: t savehist-mode: t icomplete-mode: t partial-completion-mode: t show-paren-mode: t delete-selection-mode: t use-hard-newlines: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t global-auto-composition-mode: t auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: t , SPC DEL DEL SPC E V E R SPC g o o DEL DEL DEL b e c o m e SPC e DEL t e l e v i s i o n SPC r p DEL DEL p r e s e n t e r s RET E v e n SPC o n e s SPC w i t h SPC n o SPC f a c i a l SPC ESC b ESC [ 1 ~ C-k E v e n SPC t h e SPC w u s s y SPC o n e s SPC w i t h SPC n o SPC m o u s t a c h e , SPC l i k e SPC M a c C DEL G u y v e r ESC [ 1 ~ C-k C-x ESC O D ESC O B ESC O A ESC O A ESC [ 4 ~ ESC O C C-x ESC O C ESC x r e p o r t SPC e m a c s SPC b u g RET f a c e - s p e c - s e t SPC n o w SPC a m e n d s ESC [ 1 ~ C-k TAB C-g C-x ESC O B TAB I SPC n e v e r SPC c l a i m e d SPC h e SPC w a s SPC c o o l SPC - - SPC j u s t SPC h i s SPC n a m e SPC i s SPC c o o l RET C-r j e w i s h RET RET RET C-x ESC O D C-x ESC O C ESC x ESC O A RET Recent messages: Mark saved where search started [6 times] Mark set Mark activated Quit Mark set Mark saved where search started Mark set [2 times] Quit [2 times] windmove-do-window-select: Minibuffer is inactive Mark saved where search started