GNU bug report logs - #6154
error from: describe-face font-lock-*

Previous Next

Package: emacs;

Reported by: David Reitter <david.reitter <at> gmail.com>

Date: Mon, 10 May 2010 14:15:03 UTC

Severity: minor

Tags: wontfix

Done: Glenn Morris <rgm <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: David Reitter <david.reitter <at> gmail.com>
Subject: bug#6154: closed (Re: bug#6154: error from: describe-face
 font-lock-*)
Date: Sat, 09 Jul 2011 18:24:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#6154: error from: describe-face font-lock-*

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 6154 <at> debbugs.gnu.org.

-- 
6154: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=6154
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Glenn Morris <rgm <at> gnu.org>
To: 6154-done <at> debbugs.gnu.org
Subject: Re: bug#6154: error from: describe-face font-lock-*
Date: Sat, 09 Jul 2011 14:23:34 -0400
I don't see a need to keep open this particular report.
Faces aren't defined in C, they are defined in Lisp.



[Message part 3 (message/rfc822, inline)]
From: David Reitter <david.reitter <at> gmail.com>
To: Bug-Gnu-Emacs <bug-gnu-emacs <at> gnu.org>
Subject: error from: describe-face font-lock-*
Date: Mon, 10 May 2010 09:58:10 -0400
[Message part 4 (text/plain, inline)]
X-Debbugs-CC: nathaniel.cunningham <at> gmail.com

`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'.

I suggest the patch below. 



Debugger entered--Lisp error: (wrong-type-argument stringp C-source)
  file-name-nondirectory(C-source)
  describe-face((font-lock-constant-face))
  call-interactively(describe-face t nil)
  execute-extended-command(nil)
  call-interactively(execute-extended-command nil nil)




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:

> From: Nathaniel Cunningham <nathaniel.cunningham <at> gmail.com>
> Date: May 10, 2010 1:57:32 AM EDT
> To: Development of Aquamacs Emacs <aquamacs-devel <at> aquamacs.org>
> Subject: [Aquamacs-devel] error from: describe-face font-lock-*
> Reply-To: Aquamacs Developers <aquamacs-devel <at> aquamacs.org>
> 
> 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.

[Message part 5 (text/html, inline)]

This bug report was last modified 13 years and 321 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.