aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2004-03-25 10:36:55 +0000
committerJuri Linkov2004-03-25 10:36:55 +0000
commit723549106226fa072fefbb26ac493a392adde689 (patch)
tree90554f5298fe76be4ddc54e89c29ccf47195b36f
parentd9026f5cb06a258d14680c9534ed863c4ccdd595 (diff)
downloademacs-723549106226fa072fefbb26ac493a392adde689.tar.gz
emacs-723549106226fa072fefbb26ac493a392adde689.zip
(describe-property-list): Add a button for `face' property
that calls `describe-face'.
-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 @@
1;;; descr-text.el --- describe text mode 1;;; descr-text.el --- describe text mode
2 2
3;; Copyright (c) 1994, 1995, 1996, 2001, 02, 03 Free Software Foundation, Inc. 3;; Copyright (c) 1994, 95, 96, 2001, 02, 03, 04 Free Software Foundation, Inc.
4 4
5;; Author: Boris Goldowsky <boris@gnu.org> 5;; Author: Boris Goldowsky <boris@gnu.org>
6;; Keywords: faces 6;; Keywords: faces
@@ -99,8 +99,8 @@ if that value is non-nil."
99(defun describe-property-list (properties) 99(defun describe-property-list (properties)
100 "Insert a description of PROPERTIES in the current buffer. 100 "Insert a description of PROPERTIES in the current buffer.
101PROPERTIES should be a list of overlay or text properties. 101PROPERTIES should be a list of overlay or text properties.
102The `category' property is made into a widget button that call 102The `category' and `face' properties are made into widget buttons
103`describe-text-category' when pushed." 103that call `describe-text-category' or `describe-face' when pushed."
104 ;; Sort the properties by the size of their value. 104 ;; Sort the properties by the size of their value.
105 (dolist (elt (sort (let ((ret nil) 105 (dolist (elt (sort (let ((ret nil)
106 (key nil) 106 (key nil)
@@ -110,7 +110,7 @@ The `category' property is made into a widget button that call
110 (setq key (pop properties) 110 (setq key (pop properties)
111 val (pop properties) 111 val (pop properties)
112 len 0) 112 len 0)
113 (unless (or (eq key 'category) 113 (unless (or (memq key '(category face))
114 (widgetp val)) 114 (widgetp val))
115 (setq val (pp-to-string val) 115 (setq val (pp-to-string val)
116 len (length val))) 116 len (length val)))
@@ -128,6 +128,11 @@ The `category' property is made into a widget button that call
128 :notify `(lambda (&rest ignore) 128 :notify `(lambda (&rest ignore)
129 (describe-text-category ',value)) 129 (describe-text-category ',value))
130 (format "%S" value))) 130 (format "%S" value)))
131 ((eq key 'face)
132 (widget-create 'link
133 :notify `(lambda (&rest ignore)
134 (describe-face ',value))
135 (format "%S" value)))
131 ((widgetp value) 136 ((widgetp value)
132 (describe-text-widget value)) 137 (describe-text-widget value))
133 (t 138 (t