]> git.eshelyaron.com Git - emacs.git/commitdiff
(describe-text-properties): Don't err if called in
authorKim F. Storm <storm@cua.dk>
Mon, 1 Nov 2004 23:06:51 +0000 (23:06 +0000)
committerKim F. Storm <storm@cua.dk>
Mon, 1 Nov 2004 23:06:51 +0000 (23:06 +0000)
the *Help* buffer; output to *Help-2* buffer instead.

lisp/descr-text.el

index 8ac2d36334bee676e067277daf393aed87b386dc..72ddde7c8cb0b857d200aef1ec610a7029c76972 100644 (file)
@@ -176,11 +176,12 @@ otherwise."
       (describe-text-properties-1 pos output-buffer)
     (if (not (or (text-properties-at pos) (overlays-at pos)))
        (message "This is plain text.")
-      (let ((buffer (current-buffer)))
-       (when (eq buffer (get-buffer "*Help*"))
-         (error "Can't do self inspection"))
+      (let ((buffer (current-buffer))
+           (target-buffer "*Help*"))
+       (when (eq buffer (get-buffer target-buffer))
+         (setq target-buffer "*Help-2*"))
        (save-excursion
-         (with-output-to-temp-buffer "*Help*"
+         (with-output-to-temp-buffer target-buffer
            (set-buffer standard-output)
            (setq output-buffer (current-buffer))
            (widget-insert "Text content at position " (format "%d" pos) ":\n\n")