summaryrefslogtreecommitdiff
path: root/lisp/descr-text.el
diff options
context:
space:
mode:
authorJuri Linkov <juri@jurta.org>2004-03-25 10:36:55 +0000
committerJuri Linkov <juri@jurta.org>2004-03-25 10:36:55 +0000
commit723549106226fa072fefbb26ac493a392adde689 (patch)
tree90554f5298fe76be4ddc54e89c29ccf47195b36f /lisp/descr-text.el
parentd9026f5cb06a258d14680c9534ed863c4ccdd595 (diff)
downloademacs-723549106226fa072fefbb26ac493a392adde689.tar.gz
(describe-property-list): Add a button for `face' property
that calls `describe-face'.
Diffstat (limited to 'lisp/descr-text.el')
-rw-r--r--lisp/descr-text.el13
1 files changed, 9 insertions, 4 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 03edf020395..abc0d588a14 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -1,6 +1,6 @@
;;; descr-text.el --- describe text mode
-;; Copyright (c) 1994, 1995, 1996, 2001, 02, 03 Free Software Foundation, Inc.
+;; Copyright (c) 1994, 95, 96, 2001, 02, 03, 04 Free Software Foundation, Inc.
;; Author: Boris Goldowsky <boris@gnu.org>
;; Keywords: faces
@@ -99,8 +99,8 @@ if that value is non-nil."
(defun describe-property-list (properties)
"Insert a description of PROPERTIES in the current buffer.
PROPERTIES should be a list of overlay or text properties.
-The `category' property is made into a widget button that call
-`describe-text-category' when pushed."
+The `category' and `face' properties are made into widget buttons
+that call `describe-text-category' or `describe-face' when pushed."
;; Sort the properties by the size of their value.
(dolist (elt (sort (let ((ret nil)
(key nil)
@@ -110,7 +110,7 @@ The `category' property is made into a widget button that call
(setq key (pop properties)
val (pop properties)
len 0)
- (unless (or (eq key 'category)
+ (unless (or (memq key '(category face))
(widgetp val))
(setq val (pp-to-string val)
len (length val)))
@@ -128,6 +128,11 @@ The `category' property is made into a widget button that call
:notify `(lambda (&rest ignore)
(describe-text-category ',value))
(format "%S" value)))
+ ((eq key 'face)
+ (widget-create 'link
+ :notify `(lambda (&rest ignore)
+ (describe-face ',value))
+ (format "%S" value)))
((widgetp value)
(describe-text-widget value))
(t