Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
0d3b1f4e
Commit
0d3b1f4e
authored
Jan 11, 2009
by
Chong Yidong
Browse files
(describe-face): Ignore anonymous faces.
parent
4a6f62a1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
44 additions
and
40 deletions
+44
-40
lisp/faces.el
lisp/faces.el
+44
-40
No files found.
lisp/faces.el
View file @
0d3b1f4e
...
...
@@ -1357,46 +1357,50 @@ If FRAME is omitted or nil, use the selected frame."
(
set-buffer
standard-output
)
(
dolist
(
f
face
)
(
if
(
stringp
f
)
(
setq
f
(
intern
f
)))
(
insert
"Face: "
(
symbol-name
f
))
(
if
(
not
(
facep
f
))
(
insert
" undefined face.\n"
)
(
let
((
customize-label
"customize this face"
)
file-name
)
(
insert
(
concat
" ("
(
propertize
"sample"
'font-lock-face
f
)
")"
))
(
princ
(
concat
" ("
customize-label
")\n"
))
(
insert
"Documentation: "
(
or
(
face-documentation
f
)
"Not documented as a face."
)
"\n"
)
(
with-current-buffer
standard-output
(
save-excursion
(
re-search-backward
(
concat
"\\("
customize-label
"\\)"
)
nil
t
)
(
help-xref-button
1
'help-customize-face
f
)))
(
setq
file-name
(
find-lisp-object-file-name
f
'defface
))
(
when
file-name
(
princ
"Defined in `"
)
(
princ
(
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
))
(
princ
"."
)
(
terpri
)
(
terpri
))
(
dolist
(
a
attrs
)
(
let
((
attr
(
face-attribute
f
(
car
a
)
frame
)))
(
insert
(
make-string
(
-
max-width
(
length
(
cdr
a
)))
?\s
)
(
cdr
a
)
": "
(
format
"%s"
attr
))
(
if
(
and
(
eq
(
car
a
)
:inherit
)
(
not
(
eq
attr
'unspecified
)))
;; Make a hyperlink to the parent face.
(
save-excursion
(
re-search-backward
": \\([^:]+\\)"
nil
t
)
(
help-xref-button
1
'help-face
attr
)))
(
insert
"\n"
)))))
(
terpri
))))))
;; We may get called for anonymous faces (i.e., faces
;; expressed using prop-value plists). Those can't be
;; usefully customized, so ignore them.
(
when
(
symbolp
f
)
(
insert
"Face: "
(
symbol-name
f
))
(
if
(
not
(
facep
f
))
(
insert
" undefined face.\n"
)
(
let
((
customize-label
"customize this face"
)
file-name
)
(
insert
(
concat
" ("
(
propertize
"sample"
'font-lock-face
f
)
")"
))
(
princ
(
concat
" ("
customize-label
")\n"
))
(
insert
"Documentation: "
(
or
(
face-documentation
f
)
"Not documented as a face."
)
"\n"
)
(
with-current-buffer
standard-output
(
save-excursion
(
re-search-backward
(
concat
"\\("
customize-label
"\\)"
)
nil
t
)
(
help-xref-button
1
'help-customize-face
f
)))
(
setq
file-name
(
find-lisp-object-file-name
f
'defface
))
(
when
file-name
(
princ
"Defined in `"
)
(
princ
(
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
))
(
princ
"."
)
(
terpri
)
(
terpri
))
(
dolist
(
a
attrs
)
(
let
((
attr
(
face-attribute
f
(
car
a
)
frame
)))
(
insert
(
make-string
(
-
max-width
(
length
(
cdr
a
)))
?\s
)
(
cdr
a
)
": "
(
format
"%s"
attr
))
(
if
(
and
(
eq
(
car
a
)
:inherit
)
(
not
(
eq
attr
'unspecified
)))
;; Make a hyperlink to the parent face.
(
save-excursion
(
re-search-backward
": \\([^:]+\\)"
nil
t
)
(
help-xref-button
1
'help-face
attr
)))
(
insert
"\n"
)))))
(
terpri
)))))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment