Subject: bug#1189: 23.0.60; error "Invalid face attribute name" :normal

From: Stephen Berman <[email-masked]>
Date: Fri, 17 Oct 2008 00:59:55 +0200

This change:

2008-10-14  Chong Yidong  <[email-masked]>

	* faces.el (set-face-attribute): Set family and foundry before
	other attributes.
	(face-spec-set-2): Pass unmodified args to set-face-attribute.

breaks a face definition I have been using without problem for several
years.  Here is the defface in question, which I essentially copied from
an existing defface (I don't remember which, sorry):

(defface todo-filed-item-header
  '((((class color)
      (background dark))
     (:foreground "deep sky blue" :normal t))
    (((class color)
      (background light))
     (:foreground "steel blue" :normal t))
    (t (:foreground "steel blue" :normal t)))
  "Face for filed todo item header string."
  :group 'todo)

When the file containing this is loaded, the error in the Subject is
raised; here is the backtrace:

Debugger entered--Lisp error: (error "Invalid face attribute name" :normal)
  internal-set-lisp-face-attribute(todo-filed-item-header :normal t #<frame [email-masked] 0x8c6c2b0>)
  set-face-attribute(todo-filed-item-header #<frame [email-masked] 0x8c6c2b0> :foreground "steel blue" :normal t)
  apply(set-face-attribute todo-filed-item-header #<frame [email-masked] 0x8c6c2b0> (:foreground "steel blue" :normal t))
  face-spec-set-2(todo-filed-item-header #<frame [email-masked] 0x8c6c2b0> (((... ...) (:foreground "deep sky blue" :normal t)) ((... ...) (:foreground "steel blue" :normal t)) (t (:foreground "steel blue" :normal t))))
  custom-declare-face(todo-filed-item-header (((... ...) (:foreground "deep sky blue" :normal t)) ((... ...) (:foreground "steel blue" :normal t)) (t (:foreground "steel blue" :normal t))) "Face for filed todo item header string." :group todo)
  (defface todo-filed-item-header (quote (... ... ...)) "Face for filed todo item header string." :group (quote todo))
  eval-buffer(#<buffer  *load*<3>> nil "/home/steve/.emacs.d/site-lisp/todo-mode.el" nil t)  ; Reading at buffer position 28222
  load-with-code-conversion("/home/steve/.emacs.d/site-lisp/todo-mode.el" "/home/steve/.emacs.d/site-lisp/todo-mode.el" nil t)
  (todo-show)
  eval-buffer(#<buffer  *load*<2>> nil "/home/steve/.emacs.d/init.el" nil t)  ; Reading at buffer position 14572
  load-with-code-conversion("/home/steve/.emacs.d/init.el" "/home/steve/.emacs.d/init.el" nil t)
  load("~/.emacs.d/init.el" nil t)
  (if (file-readable-p "~/.emacs.d/init.el") (load "~/.emacs.d/init.el" nil t) (if (file-readable-p "/etc/skel/.gnu-emacs") (load "/etc/skel/.gnu-emacs" nil t)))
  (if (string-match "XEmacs\\|Lucid" emacs-version) (progn (if ... ...)) (if (file-readable-p "~/.emacs.d/init.el") (load "~/.emacs.d/init.el" nil t) (if ... ...)))
  eval-buffer(#<buffer  *load*> nil "/home/steve/.emacs" nil t)  ; Reading at buffer position 1669
  load-with-code-conversion("/home/steve/.emacs" "/home/steve/.emacs" t t)
  load("~/.emacs" t t)
  #[nil "…´
!ƒŠ
‚‹
\"ƒ¡
#ˆßà!ˆ
*#?…³
  command-line()
  normal-top-level()

When I reverted the above change and redumped Emacs, no error was raised.

In GNU Emacs 23.0.60.8 (i686-pc-linux-gnu, GTK+ Version 2.12.9)
 of 2008-10-16 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10400090
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  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_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default-enable-multibyte-characters: t

Major mode: Fundamental

Minor modes in effect:
  display-time-mode: t
  tooltip-mode: t
  tool-bar-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  global-auto-composition-mode: t
  auto-composition-mode: t
  auto-encryption-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<help-echo> <down-mouse-1> <mouse-1> <down-mouse-1> 
<mouse-1> M-x r e p o r <tab> <return>

Recent messages:
Loading allout...done
Outline mode auto-activation and -layout enabled.
Loading /home/steve/.emacs.d/site-lisp/srb-allout.el (source)...done
Loading /home/steve/.emacs.d/site-lisp/srb-mode-line.el (source)...done
Loading /home/steve/.emacs.d/site-lisp/srb-recentf.el (source)...done
Loading /home/steve/.emacs.d/site-lisp/srb-tabbar.el (source)...done
Loading /home/steve/.emacs.d/site-lisp/tabbar.el (source)...done
Loading /home/steve/.emacs.d/site-lisp/srb-elisp.el (source)...done
Loading `slime': old-style backquotes detected!
Entering debugger...