aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2004-04-21 01:27:39 +0000
committerKenichi Handa2004-04-21 01:27:39 +0000
commit02f32cf00f49b2c031935ddcec4a50f2b91792ea (patch)
tree1b289de75a92854b6f85aa4b42e0d934d8c83c33
parentd589ba1057cd46702e22dec1eb89b023e28478c2 (diff)
downloademacs-02f32cf00f49b2c031935ddcec4a50f2b91792ea.tar.gz
emacs-02f32cf00f49b2c031935ddcec4a50f2b91792ea.zip
(describe-char): Make it work on *Help* buffer.
-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 @@
12004-04-21 Kenichi Handa <handa@m17n.org>
2
3 * descr-text.el (describe-char): Make it work on *Help* buffer.
4
12004-04-21 Kim F. Storm <storm@cua.dk> 52004-04-21 Kim F. Storm <storm@cua.dk>
2 6
3 * image.el (insert-image): Add optional SLICE arg. 7 * 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."
474 standard-display-table)) 474 standard-display-table))
475 (disp-vector (and display-table (aref display-table char))) 475 (disp-vector (and display-table (aref display-table char)))
476 (multibyte-p enable-multibyte-characters) 476 (multibyte-p enable-multibyte-characters)
477 text-prop-description
477 item-list max-width unicode) 478 item-list max-width unicode)
478 (if (eq charset 'unknown) 479 (if (eq charset 'unknown)
479 (setq item-list 480 (setq item-list
@@ -582,8 +583,14 @@ as well as widgets, buttons, overlays, and text properties."
582 (cons (list "Unicode data" " ") unicodedata)))))) 583 (cons (list "Unicode data" " ") unicodedata))))))
583 (setq max-width (apply #'max (mapcar #'(lambda (x) (length (car x))) 584 (setq max-width (apply #'max (mapcar #'(lambda (x) (length (car x)))
584 item-list))) 585 item-list)))
585 (when (eq (current-buffer) (get-buffer "*Help*")) 586 (setq text-prop-description
586 (error "Can't describe char in Help buffer")) 587 (with-temp-buffer
588 (let ((buf (current-buffer)))
589 (save-excursion
590 (set-buffer buffer)
591 (describe-text-properties pos buf)))
592 (buffer-string)))
593
587 (with-output-to-temp-buffer "*Help*" 594 (with-output-to-temp-buffer "*Help*"
588 (with-current-buffer standard-output 595 (with-current-buffer standard-output
589 (set-buffer-multibyte multibyte-p) 596 (set-buffer-multibyte multibyte-p)
@@ -658,10 +665,8 @@ as well as widgets, buttons, overlays, and text properties."
658 (insert "\nSee the variable `reference-point-alist' for " 665 (insert "\nSee the variable `reference-point-alist' for "
659 "the meaning of the rule.\n")) 666 "the meaning of the rule.\n"))
660 667
661 (let ((output (current-buffer))) 668 (insert text-prop-description)
662 (with-current-buffer buffer 669 (describe-text-mode)))))
663 (describe-text-properties pos output))
664 (describe-text-mode))))))
665 670
666(defalias 'describe-char-after 'describe-char) 671(defalias 'describe-char-after 'describe-char)
667(make-obsolete 'describe-char-after 'describe-char "21.5") 672(make-obsolete 'describe-char-after 'describe-char "21.5")