From: David Reitter <david.reitter@gmail.com>
To: 6154@debbugs.gnu.org
Cc: nathaniel.cunningham@gmail.com
Subject: bug#6154: error from: describe-face font-lock-*
Date: Mon, 10 May 2010 09:58:10 -0400 [thread overview]
Message-ID: <CB68393F-4F8F-4223-BC5C-FAAE8DEE6EE9@gmail.com> (raw)
In-Reply-To: h2m20ecf6c71005092257vefcec2ffv4a4b79c39e9294e@mail.gmail.com
[-- Attachment #1: Type: text/plain, Size: 2335 bytes --]
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.
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@gmail.com>
> Date: May 10, 2010 1:57:32 AM EDT
> To: Development of Aquamacs Emacs <aquamacs-devel@aquamacs.org>
> Subject: [Aquamacs-devel] error from: describe-face font-lock-*
> Reply-To: Aquamacs Developers <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.
[-- Attachment #2: Type: text/html, Size: 5951 bytes --]
next parent reply other threads:[~2010-05-10 13:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <h2m20ecf6c71005092257vefcec2ffv4a4b79c39e9294e@mail.gmail.com>
2010-05-10 13:58 ` David Reitter [this message]
2010-05-10 15:37 ` bug#6154: error from: describe-face font-lock-* Stefan Monnier
2010-05-10 23:04 ` David Reitter
2010-05-11 3:21 ` Dan Nicolaescu
2010-05-11 3:43 ` David Reitter
2011-07-09 18:23 ` Glenn Morris
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CB68393F-4F8F-4223-BC5C-FAAE8DEE6EE9@gmail.com \
--to=david.reitter@gmail.com \
--cc=6154@debbugs.gnu.org \
--cc=nathaniel.cunningham@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.