aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2005-12-12 16:50:39 +0000
committerStefan Monnier2005-12-12 16:50:39 +0000
commit25a3c9d12e40f4f5fa273d566251935ebcc8a7f9 (patch)
treebf96089ab4d59271dacbc34ed4272389af9cb98d
parentc71abb541e09d65beeb325bdadd3b00caaf8daa9 (diff)
downloademacs-25a3c9d12e40f4f5fa273d566251935ebcc8a7f9.tar.gz
emacs-25a3c9d12e40f4f5fa273d566251935ebcc8a7f9.zip
(describe-char): Rework last fix to solve the problem
is the same way it's solved for everything else in that function (i.e. by extracting the info before setting up the *Help* buffer).
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/descr-text.el16
2 files changed, 15 insertions, 7 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 2a6818dc99c..57af777b7f0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12005-12-12 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * descr-text.el (describe-char): Rework last fix to solve the problem
4 is the same way it's solved for everything else in that function
5 (i.e. by extracting the info before setting up the *Help* buffer).
6
12005-12-12 Kim F. Storm <storm@cua.dk> 72005-12-12 Kim F. Storm <storm@cua.dk>
2 8
3 * subr.el (version-regexp-alist): Allow space as separator before 9 * subr.el (version-regexp-alist): Allow space as separator before
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 25c81555ee8..f646a470ef4 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -464,9 +464,13 @@ as well as widgets, buttons, overlays, and text properties."
464 (single-key-description char) 464 (single-key-description char)
465 (string-to-multibyte 465 (string-to-multibyte
466 (char-to-string char))))) 466 (char-to-string char)))))
467 (orig-buf (current-buffer)) 467 (text-props-desc
468 (help-buf (if (eq orig-buf (get-buffer "*Help*")) 468 (let ((tmp-buf (generate-new-buffer " *text-props*")))
469 "*Help-2*" "*Help*")) 469 (unwind-protect
470 (progn
471 (describe-text-properties pos tmp-buf)
472 (with-current-buffer tmp-buf (buffer-string)))
473 (kill-buffer tmp-buf))))
470 item-list max-width unicode) 474 item-list max-width unicode)
471 475
472 (if (or (< char 256) 476 (if (or (< char 256)
@@ -619,7 +623,7 @@ as well as widgets, buttons, overlays, and text properties."
619 (setq max-width (apply #'max (mapcar #'(lambda (x) 623 (setq max-width (apply #'max (mapcar #'(lambda (x)
620 (if (cadr x) (length (car x)) 0)) 624 (if (cadr x) (length (car x)) 0))
621 item-list))) 625 item-list)))
622 (with-output-to-temp-buffer help-buf 626 (with-output-to-temp-buffer "*Help*"
623 (with-current-buffer standard-output 627 (with-current-buffer standard-output
624 (set-buffer-multibyte multibyte-p) 628 (set-buffer-multibyte multibyte-p)
625 (let ((formatter (format "%%%ds:" max-width))) 629 (let ((formatter (format "%%%ds:" max-width)))
@@ -722,9 +726,7 @@ as well as widgets, buttons, overlays, and text properties."
722 (insert "\nSee the variable `reference-point-alist' for " 726 (insert "\nSee the variable `reference-point-alist' for "
723 "the meaning of the rule.\n")) 727 "the meaning of the rule.\n"))
724 728
725 (save-excursion 729 (if text-props-desc (insert text-props-desc))
726 (set-buffer orig-buf)
727 (describe-text-properties pos help-buf))
728 (describe-text-mode))))) 730 (describe-text-mode)))))
729 731
730(defalias 'describe-char-after 'describe-char) 732(defalias 'describe-char-after 'describe-char)