summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKenichi Handa <handa@m17n.org>2004-04-21 01:27:39 +0000
committerKenichi Handa <handa@m17n.org>2004-04-21 01:27:39 +0000
commit02f32cf00f49b2c031935ddcec4a50f2b91792ea (patch)
tree1b289de75a92854b6f85aa4b42e0d934d8c83c33 /lisp
parentd589ba1057cd46702e22dec1eb89b023e28478c2 (diff)
downloademacs-02f32cf00f49b2c031935ddcec4a50f2b91792ea.tar.gz
(describe-char): Make it work on *Help* buffer.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog4
-rw-r--r--lisp/descr-text.el17
2 files changed, 15 insertions, 6 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f0dd96b68b3..fe4eaccabfc 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2004-04-21 Kenichi Handa <handa@m17n.org>
+
+ * descr-text.el (describe-char): Make it work on *Help* buffer.
+
2004-04-21 Kim F. Storm <storm@cua.dk>
* image.el (insert-image): Add optional SLICE arg.
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 30ef3dcf05e..c73cfeb02c3 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -474,6 +474,7 @@ as well as widgets, buttons, overlays, and text properties."
standard-display-table))
(disp-vector (and display-table (aref display-table char)))
(multibyte-p enable-multibyte-characters)
+ text-prop-description
item-list max-width unicode)
(if (eq charset 'unknown)
(setq item-list
@@ -582,8 +583,14 @@ as well as widgets, buttons, overlays, and text properties."
(cons (list "Unicode data" " ") unicodedata))))))
(setq max-width (apply #'max (mapcar #'(lambda (x) (length (car x)))
item-list)))
- (when (eq (current-buffer) (get-buffer "*Help*"))
- (error "Can't describe char in Help buffer"))
+ (setq text-prop-description
+ (with-temp-buffer
+ (let ((buf (current-buffer)))
+ (save-excursion
+ (set-buffer buffer)
+ (describe-text-properties pos buf)))
+ (buffer-string)))
+
(with-output-to-temp-buffer "*Help*"
(with-current-buffer standard-output
(set-buffer-multibyte multibyte-p)
@@ -658,10 +665,8 @@ as well as widgets, buttons, overlays, and text properties."
(insert "\nSee the variable `reference-point-alist' for "
"the meaning of the rule.\n"))
- (let ((output (current-buffer)))
- (with-current-buffer buffer
- (describe-text-properties pos output))
- (describe-text-mode))))))
+ (insert text-prop-description)
+ (describe-text-mode)))))
(defalias 'describe-char-after 'describe-char)
(make-obsolete 'describe-char-after 'describe-char "21.5")