/[emacs]/emacs/lisp/descr-text.el
ViewVC logotype

Diff of /emacs/lisp/descr-text.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by rms, Mon Jun 17 16:12:47 2002 UTC revision 1.6 by monnier, Mon Jun 24 21:35:09 2002 UTC
# Line 95  if that value is non-nil." Line 95  if that value is non-nil."
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)
# Line 117  The `category' property is made into a w Line 117  The `category' property is made into a w
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)))
# Line 161  otherwise." Line 161  otherwise."
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*"

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26