diff options
| author | Stefan Monnier | 2002-06-24 21:35:09 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2002-06-24 21:35:09 +0000 |
| commit | c1a1535ae4e4c2b70721967c8142d7e294b0ce88 (patch) | |
| tree | 4fc17fe3e6727d85af7b690bd6c7d96f6ed263dc | |
| parent | 9756ea0f8312f00af981ffe6e07b763c944b097a (diff) | |
| download | emacs-c1a1535ae4e4c2b70721967c8142d7e294b0ce88.tar.gz emacs-c1a1535ae4e4c2b70721967c8142d7e294b0ce88.zip | |
(describe-property-list): Make sure there's
a space between the property name and its value.
(describe-text-properties): Don't kill a pre-existing buffer.
| -rw-r--r-- | lisp/descr-text.el | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index e75769078b0..525e06e4a37 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -95,7 +95,7 @@ if that value is non-nil." | |||
| 95 | (defun describe-property-list (properties) | 95 | (defun describe-property-list (properties) |
| 96 | "Insert a description of PROPERTIES in the current buffer. | 96 | "Insert a description of PROPERTIES in the current buffer. |
| 97 | PROPERTIES should be a list of overlay or text properties. | 97 | PROPERTIES should be a list of overlay or text properties. |
| 98 | The `category' property is made into a widget button that call | 98 | The `category' property is made into a widget button that call |
| 99 | `describe-text-category' when pushed." | 99 | `describe-text-category' when pushed." |
| 100 | ;; Sort the properties by the size of their value. | 100 | ;; Sort the properties by the size of their value. |
| 101 | (dolist (elt (sort (let ((ret nil) | 101 | (dolist (elt (sort (let ((ret nil) |
| @@ -117,10 +117,10 @@ The `category' property is made into a widget button that call | |||
| 117 | (nth 2 b))))) | 117 | (nth 2 b))))) |
| 118 | (let ((key (nth 0 elt)) | 118 | (let ((key (nth 0 elt)) |
| 119 | (value (nth 1 elt))) | 119 | (value (nth 1 elt))) |
| 120 | (widget-insert (propertize (format " %-20s" key) | 120 | (widget-insert (propertize (format " %-20s " key) |
| 121 | 'font-lock-face 'italic)) | 121 | 'font-lock-face 'italic)) |
| 122 | (cond ((eq key 'category) | 122 | (cond ((eq key 'category) |
| 123 | (widget-create 'link | 123 | (widget-create 'link |
| 124 | :notify `(lambda (&rest ignore) | 124 | :notify `(lambda (&rest ignore) |
| 125 | (describe-text-category ',value)) | 125 | (describe-text-category ',value)) |
| 126 | (format "%S" value))) | 126 | (format "%S" value))) |
| @@ -161,8 +161,6 @@ otherwise." | |||
| 161 | (describe-text-properties-1 pos output-buffer) | 161 | (describe-text-properties-1 pos output-buffer) |
| 162 | (if (not (or (text-properties-at pos) (overlays-at pos))) | 162 | (if (not (or (text-properties-at pos) (overlays-at pos))) |
| 163 | (message "This is plain text.") | 163 | (message "This is plain text.") |
| 164 | (when (get-buffer "*Text Description*") | ||
| 165 | (kill-buffer "*Text Description*")) | ||
| 166 | (let ((buffer (current-buffer))) | 164 | (let ((buffer (current-buffer))) |
| 167 | (save-excursion | 165 | (save-excursion |
| 168 | (with-output-to-temp-buffer "*Text Description*" | 166 | (with-output-to-temp-buffer "*Text Description*" |