aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2004-04-20 05:25:47 +0000
committerKenichi Handa2004-04-20 05:25:47 +0000
commit3a73f42898dea2c1ce0d55785f800a6e787aaecb (patch)
tree868f980c3d2dca575432c6afd953ddbcff83ff4d
parent1fd730f7b6a2d822f7bfb0f05d422ea86e6158a8 (diff)
downloademacs-3a73f42898dea2c1ce0d55785f800a6e787aaecb.tar.gz
emacs-3a73f42898dea2c1ce0d55785f800a6e787aaecb.zip
(describe-char): Make it work on *Help* buffer.
Suppress auto-compostion on a region describing about composition.
-rw-r--r--lisp/descr-text.el23
1 files changed, 17 insertions, 6 deletions
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 8ed2a2824bf..86f2736f448 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 code item-list max-width) 478 code item-list max-width)
478 (or (and (charsetp charset) (encode-char char charset)) 479 (or (and (charsetp charset) (encode-char char charset))
479 (setq charset (char-charset char))) 480 (setq charset (char-charset char)))
@@ -574,8 +575,17 @@ as well as widgets, buttons, overlays, and text properties."
574 (length (car x)) 575 (length (car x))
575 0)) 576 0))
576 item-list))) 577 item-list)))
577 (when (eq (current-buffer) (get-buffer "*Help*")) 578
578 (error "Can't describe char in Help buffer")) 579 (setq text-prop-description
580 (with-temp-buffer
581 (let ((buf (current-buffer)))
582 (save-excursion
583 (set-buffer buffer)
584 (describe-text-properties pos buf)))
585 (buffer-string)))
586
587 ;;(when (eq (current-buffer) (get-buffer "*Help*"))
588 ;;(error "Can't describe char in Help buffer"))
579 (with-output-to-temp-buffer "*Help*" 589 (with-output-to-temp-buffer "*Help*"
580 (with-current-buffer standard-output 590 (with-current-buffer standard-output
581 (set-buffer-multibyte multibyte-p) 591 (set-buffer-multibyte multibyte-p)
@@ -614,6 +624,7 @@ as well as widgets, buttons, overlays, and text properties."
614 (or (cdr (aref disp-vector i)) "-- not encodable --") 624 (or (cdr (aref disp-vector i)) "-- not encodable --")
615 "\n")))) 625 "\n"))))
616 626
627 (setq pos (point))
617 (when composition 628 (when composition
618 (insert "\nComposed") 629 (insert "\nComposed")
619 (if (car composition) 630 (if (car composition)
@@ -649,11 +660,11 @@ as well as widgets, buttons, overlays, and text properties."
649 (or (cdr elt) "-- not encodable --")))) 660 (or (cdr elt) "-- not encodable --"))))
650 (insert "\nSee the variable `reference-point-alist' for " 661 (insert "\nSee the variable `reference-point-alist' for "
651 "the meaning of the rule.\n")) 662 "the meaning of the rule.\n"))
663 (put-text-property pos (point) 'auto-composed t)
664
665 (insert text-prop-description)
666 (describe-text-mode)))))
652 667
653 (let ((output (current-buffer)))
654 (with-current-buffer buffer
655 (describe-text-properties pos output))
656 (describe-text-mode))))))
657 668
658(defalias 'describe-char-after 'describe-char) 669(defalias 'describe-char-after 'describe-char)
659(make-obsolete 'describe-char-after 'describe-char "21.5") 670(make-obsolete 'describe-char-after 'describe-char "21.5")