`describe-face' assumes that `find-lisp-object-file-name' always returns a file name. I'm seeing the bug described below because we're pre-loading font-lock and this function returns `C-source'.
diff --git a/lisp/faces.el b/lisp/faces.el
index 740c7f7..5994f3e 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1406,12 +1406,14 @@ If FRAME is omitted or nil, use the selected frame."
(setq file-name (find-lisp-object-file-name f 'defface))
(when file-name
(princ "Defined in `")
- (princ (file-name-nondirectory file-name))
+ (princ (if (symbolp file-name) file-name
+ (file-name-nondirectory file-name)))
(princ "'")
;; Make a hyperlink to the library.
- (save-excursion
- (re-search-backward "`\\([^`']+\\)'" nil t)
- (help-xref-button 1 'help-face-def f file-name))
+ (unless (symbolp file-name)
+ (save-excursion
+ (re-search-backward "`\\([^`']+\\)'" nil t)
+ (help-xref-button 1 'help-face-def f file-name)))
(princ ".")
(terpri)
(terpri))
Begin forwarded message:
Date: May 10, 2010 1:57:32 AM EDT
Subject: [Aquamacs-devel] error from: describe-face font-lock-*
Just came across this error:
M-x describe-face [RET] font-lock-constant-face [RET]
Wrong type argument: stringp, C-source
No *Help* frame appears. If I then describe a different face sucessfully, e.g. tabbar-default, then repeat the sequence above, the *Help* frame get reused, and says:
Face: font-lock-constant-face (sample) (customize this face)
Documentation:
Font Lock mode face used to highlight constants and labels.
Defined in `
I get the same error for all the font-lock faces tested so far, but no others.