95 |
(defun describe-property-list (properties) |
(defun describe-property-list (properties) |
96 |
"Insert a description of PROPERTIES in the current buffer. |
"Insert a description of PROPERTIES in the current buffer. |
97 |
PROPERTIES should be a list of overlay or text properties. |
PROPERTIES should be a list of overlay or text properties. |
98 |
The `category' property is made into a widget button that call |
The `category' property is made into a widget button that call |
99 |
`describe-text-category' when pushed." |
`describe-text-category' when pushed." |
100 |
;; Sort the properties by the size of their value. |
;; Sort the properties by the size of their value. |
101 |
(dolist (elt (sort (let ((ret nil) |
(dolist (elt (sort (let ((ret nil) |
117 |
(nth 2 b))))) |
(nth 2 b))))) |
118 |
(let ((key (nth 0 elt)) |
(let ((key (nth 0 elt)) |
119 |
(value (nth 1 elt))) |
(value (nth 1 elt))) |
120 |
(widget-insert (propertize (format " %-20s" key) |
(widget-insert (propertize (format " %-20s " key) |
121 |
'font-lock-face 'italic)) |
'font-lock-face 'italic)) |
122 |
(cond ((eq key 'category) |
(cond ((eq key 'category) |
123 |
(widget-create 'link |
(widget-create 'link |
124 |
:notify `(lambda (&rest ignore) |
:notify `(lambda (&rest ignore) |
125 |
(describe-text-category ',value)) |
(describe-text-category ',value)) |
126 |
(format "%S" value))) |
(format "%S" value))) |
161 |
(describe-text-properties-1 pos output-buffer) |
(describe-text-properties-1 pos output-buffer) |
162 |
(if (not (or (text-properties-at pos) (overlays-at pos))) |
(if (not (or (text-properties-at pos) (overlays-at pos))) |
163 |
(message "This is plain text.") |
(message "This is plain text.") |
|
(when (get-buffer "*Text Description*") |
|
|
(kill-buffer "*Text Description*")) |
|
164 |
(let ((buffer (current-buffer))) |
(let ((buffer (current-buffer))) |
165 |
(save-excursion |
(save-excursion |
166 |
(with-output-to-temp-buffer "*Text Description*" |
(with-output-to-temp-buffer "*Text Description*" |