diff options
| author | Kim F. Storm | 2004-11-01 23:06:51 +0000 |
|---|---|---|
| committer | Kim F. Storm | 2004-11-01 23:06:51 +0000 |
| commit | 0911ac26575a836e9df8a2b2148503bfbb5af400 (patch) | |
| tree | 7a24d6ddfe2bdbafd1ebf19e0435c5403abb3ccb | |
| parent | e26422500cc9e78c73c3d2929f9fc226ad68c977 (diff) | |
| download | emacs-0911ac26575a836e9df8a2b2148503bfbb5af400.tar.gz emacs-0911ac26575a836e9df8a2b2148503bfbb5af400.zip | |
(describe-text-properties): Don't err if called in
the *Help* buffer; output to *Help-2* buffer instead.
| -rw-r--r-- | lisp/descr-text.el | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 8ac2d36334b..72ddde7c8cb 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -176,11 +176,12 @@ otherwise." | |||
| 176 | (describe-text-properties-1 pos output-buffer) | 176 | (describe-text-properties-1 pos output-buffer) |
| 177 | (if (not (or (text-properties-at pos) (overlays-at pos))) | 177 | (if (not (or (text-properties-at pos) (overlays-at pos))) |
| 178 | (message "This is plain text.") | 178 | (message "This is plain text.") |
| 179 | (let ((buffer (current-buffer))) | 179 | (let ((buffer (current-buffer)) |
| 180 | (when (eq buffer (get-buffer "*Help*")) | 180 | (target-buffer "*Help*")) |
| 181 | (error "Can't do self inspection")) | 181 | (when (eq buffer (get-buffer target-buffer)) |
| 182 | (setq target-buffer "*Help-2*")) | ||
| 182 | (save-excursion | 183 | (save-excursion |
| 183 | (with-output-to-temp-buffer "*Help*" | 184 | (with-output-to-temp-buffer target-buffer |
| 184 | (set-buffer standard-output) | 185 | (set-buffer standard-output) |
| 185 | (setq output-buffer (current-buffer)) | 186 | (setq output-buffer (current-buffer)) |
| 186 | (widget-insert "Text content at position " (format "%d" pos) ":\n\n") | 187 | (widget-insert "Text content at position " (format "%d" pos) ":\n\n") |