aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/faces.el
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>2005-05-16 03:31:11 +0000
committerRichard M. Stallman <[email protected]>2005-05-16 03:31:11 +0000
commit19941ff5327e3c31208fe73a12859e660755b837 (patch)
tree1dc462b2bd926352d2694aefb4789c27237e18f0 /lisp/faces.el
parentb987b30f4161802e42f07d4250ff4c210ad2062e (diff)
(describe-face): Output a definition link button.
Diffstat (limited to 'lisp/faces.el')
-rw-r--r--lisp/faces.el21
1 files changed, 18 insertions, 3 deletions
diff --git a/lisp/faces.el b/lisp/faces.el
index b018d5a57a..6b3811a3d2 100644
--- a/lisp/faces.el
+++ b/lisp/faces.el
@@ -1257,17 +1257,32 @@ If FRAME is omitted or nil, use the selected frame."
(insert "Face: " (symbol-name f))
(if (not (facep f))
(insert " undefined face.\n")
- (let ((customize-label "customize this face"))
+ (let ((customize-label "customize this face")
+ file-name)
(princ (concat " (" customize-label ")\n"))
(insert "Documentation: "
(or (face-documentation f)
"Not documented as a face.")
- "\n\n")
+ "\n")
(with-current-buffer standard-output
(save-excursion
(re-search-backward
(concat "\\(" customize-label "\\)") nil t)
(help-xref-button 1 'help-customize-face f)))
+ ;; The next 4 sexps are copied from describe-function-1
+ ;; and simplified.
+ (setq file-name (symbol-file f 'defface))
+ (when file-name
+ (princ "Defined in `")
+ (princ 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))) ?\ )
@@ -2047,7 +2062,7 @@ Note: Other faces cannot inherit from the cursor face."
(t :inverse-video t))
"Basic face for highlighting trailing whitespace."
:version "21.1"
- :group 'font-lock ; like `show-trailing-whitespace'
+ :group 'whitespace ; like `show-trailing-whitespace'
:group 'basic-faces)
(defface escape-glyph '((((background dark)) :foreground "cyan")