From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: David Reitter Newsgroups: gmane.emacs.bugs Subject: bug#6154: error from: describe-face font-lock-* Date: Mon, 10 May 2010 09:58:10 -0400 Message-ID: References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 (Apple Message framework v1078) Content-Type: multipart/alternative; boundary=Apple-Mail-52-987430898 X-Trace: dough.gmane.org 1273502437 5613 80.91.229.12 (10 May 2010 14:40:37 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Mon, 10 May 2010 14:40:37 +0000 (UTC) Cc: nathaniel.cunningham@gmail.com To: 6154@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon May 10 16:40:34 2010 connect(): No such file or directory 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.69) (envelope-from ) id 1OBU9n-0006Jb-7B for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 May 2010 16:40:31 +0200 Original-Received: from localhost ([127.0.0.1]:52072 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBTx9-0006BM-42 for geb-bug-gnu-emacs@m.gmane.org; Mon, 10 May 2010 10:27:27 -0400 Original-Received: from [140.186.70.92] (port=47584 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBTwP-0005q7-VO for bug-gnu-emacs@gnu.org; Mon, 10 May 2010 10:26:50 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBTwG-0004av-TY for bug-gnu-emacs@gnu.org; Mon, 10 May 2010 10:26:41 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39754) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBTwG-0004ar-PA for bug-gnu-emacs@gnu.org; Mon, 10 May 2010 10:26:32 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1OBTl9-0005ck-GN; Mon, 10 May 2010 10:15:03 -0400 X-Loop: help-debbugs@gnu.org Resent-From: David Reitter Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: nathaniel.cunningham@gmail.com, bug-gnu-emacs@gnu.org Resent-Date: Mon, 10 May 2010 14:15:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 6154 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: Bug-Gnu-Emacs X-Debbugs-Original-Xcc: nathaniel.cunningham@gmail.com Original-Received: via spool by submit@debbugs.gnu.org id=B.127350089121595 (code B ref -1); Mon, 10 May 2010 14:15:03 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 May 2010 14:14:51 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBTkx-0005cG-2D for submit@debbugs.gnu.org; Mon, 10 May 2010 10:14:51 -0400 Original-Received: from mx10.gnu.org ([199.232.76.166]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBTku-0005cB-Aa for submit@debbugs.gnu.org; Mon, 10 May 2010 10:14:49 -0400 Original-Received: from lists.gnu.org ([199.232.76.165]:43198) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1OBTkp-0001yx-7n for submit@debbugs.gnu.org; Mon, 10 May 2010 10:14:43 -0400 Original-Received: from [140.186.70.92] (port=44961 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OBTk6-0003lW-W3 for bug-gnu-emacs@gnu.org; Mon, 10 May 2010 10:14:42 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OBTUx-0007uI-To for bug-gnu-emacs@gnu.org; Mon, 10 May 2010 09:58:25 -0400 Original-Received: from mail-qy0-f187.google.com ([209.85.221.187]:34582) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OBTUx-0007tU-Pf for bug-gnu-emacs@gnu.org; Mon, 10 May 2010 09:58:19 -0400 Original-Received: by qyk17 with SMTP id 17so3853560qyk.12 for ; Mon, 10 May 2010 06:58:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:content-type:subject :date:references:to:message-id:mime-version:x-mailer; bh=T+A2zU/bkSYmFfejAl4T25lqcAsKooDsAPC1KeGoopA=; b=k33CQYIr+QKTp7qB+MnA18HiJZEjZWv4mGLGwTfbuFU+LnA8GhiIMIT17cJBu2MjSD upLPlrA4Bgh2KMFhvOdWqsXsc1+kEBSOO69L+IxDFy7SDiD01hWsCe3pJJN/dHspGOaF Z4g6uVHyDdelr0mEPloismjrIgLaMfLtE7Ttk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:content-type:subject:date:references:to:message-id :mime-version:x-mailer; b=w7qoU+BmRik98Je98ktr2K1iNnpd4lI+lEtHu3BTGxYbukGAhuZghLPONK+vHpJNt2 YpAqnkZ3LTQ5T3YHuq4trWMqSW1Y+TRJYJp+wSesDo37ZvWq52Afd54liwXRouRKGVzW q8HgN+mArWn0iaYkuplmCkoPkHf3guzQAKak4= Original-Received: by 10.224.45.31 with SMTP id c31mr2593412qaf.223.1273499896742; Mon, 10 May 2010 06:58:16 -0700 (PDT) Original-Received: from [192.168.1.42] (pool-72-95-200-56.pitbpa.east.verizon.net [72.95.200.56]) by mx.google.com with ESMTPS id v37sm4008634qce.18.2010.05.10.06.58.15 (version=TLSv1/SSLv3 cipher=RC4-MD5); Mon, 10 May 2010 06:58:15 -0700 (PDT) X-Mailer: Apple Mail (2.1078) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Mon, 10 May 2010 10:15:03 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: bug-gnu-emacs@gnu.org 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:36830 Archived-At: --Apple-Mail-52-987430898 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii X-Debbugs-CC: nathaniel.cunningham@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.=20 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 > Date: May 10, 2010 1:57:32 AM EDT > To: Development of Aquamacs Emacs > Subject: [Aquamacs-devel] error from: describe-face font-lock-* > Reply-To: Aquamacs Developers >=20 > Just came across this error: > M-x describe-face [RET] font-lock-constant-face [RET] >=20 > Wrong type argument: stringp, C-source >=20 > 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: >=20 > Face: font-lock-constant-face (sample) (customize this face) >=20 > Documentation: > Font Lock mode face used to highlight constants and labels. >=20 > Defined in ` >=20 > I get the same error for all the font-lock faces tested so far, but no = others. --Apple-Mail-52-987430898 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii nathaniel.cunningham@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. 



Debugg= er entered--Lisp error: (wrong-type-argument stringp = C-source)
  file-name-nondirectory(C-source)
  describe-face((font-lock-constant-face))
 &nbs= p;call-interactively(describe-face t = nil)
  execute-extended-command(nil)
 &= nbsp;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))



Beg= in forwarded message:

From: Nathaniel = Cunningham <nathaniel.cunningham@gmail.= com>
Date: May 10, 2010 1:57:32 AM EDT
To: Development of = Aquamacs Emacs <aquamacs-devel@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.

= --Apple-Mail-52-987430898--