aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2005-12-08 01:39:37 +0000
committerKenichi Handa2005-12-08 01:39:37 +0000
commit086c5b2bca8f99211068d6a5d22c4306db916ef2 (patch)
treeed36ad228410c1ca81198a4a79ca5c991e805b92
parent4af6c01113bd24f92c88c7861c49e902cc669931 (diff)
downloademacs-086c5b2bca8f99211068d6a5d22c4306db916ef2.tar.gz
emacs-086c5b2bca8f99211068d6a5d22c4306db916ef2.zip
(describe-char): Use *Help-2* buffer if the
current buffer is *Help*. Call describe-text-properties while setting the original buffer.
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/descr-text.el24
2 files changed, 20 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index f5ba9ceee7d..84232e0a2be 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12005-12-08 Kenichi Handa <handa@m17n.org>
2
3 * descr-text.el (describe-char): Use *Help-2* buffer if the
4 current buffer is *Help*. Call describe-text-properties while
5 setting the original buffer.
6
12005-12-07 Bill Wohler <wohler@newt.com> 72005-12-07 Bill Wohler <wohler@newt.com>
2 8
3 * files.el (auto-mode-alist): Remove mh-letter-mode. Unnecessary, 9 * files.el (auto-mode-alist): Remove mh-letter-mode. Unnecessary,
diff --git a/lisp/descr-text.el b/lisp/descr-text.el
index 547970a585b..25c81555ee8 100644
--- a/lisp/descr-text.el
+++ b/lisp/descr-text.el
@@ -464,6 +464,9 @@ 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))
468 (help-buf (if (eq orig-buf (get-buffer "*Help*"))
469 "*Help-2*" "*Help*"))
467 item-list max-width unicode) 470 item-list max-width unicode)
468 471
469 (if (or (< char 256) 472 (if (or (< char 256)
@@ -616,7 +619,7 @@ as well as widgets, buttons, overlays, and text properties."
616 (setq max-width (apply #'max (mapcar #'(lambda (x) 619 (setq max-width (apply #'max (mapcar #'(lambda (x)
617 (if (cadr x) (length (car x)) 0)) 620 (if (cadr x) (length (car x)) 0))
618 item-list))) 621 item-list)))
619 (with-output-to-temp-buffer "*Help*" 622 (with-output-to-temp-buffer help-buf
620 (with-current-buffer standard-output 623 (with-current-buffer standard-output
621 (set-buffer-multibyte multibyte-p) 624 (set-buffer-multibyte multibyte-p)
622 (let ((formatter (format "%%%ds:" max-width))) 625 (let ((formatter (format "%%%ds:" max-width)))
@@ -636,18 +639,17 @@ as well as widgets, buttons, overlays, and text properties."
636 (insert " " clm))) 639 (insert " " clm)))
637 (insert "\n")))) 640 (insert "\n"))))
638 641
639 (save-excursion 642 (when overlays
640 (goto-char (point-min)) 643 (save-excursion
641 (re-search-forward "character:[ \t\n]+") 644 (goto-char (point-min))
642 (setq pos (point))) 645 (re-search-forward "character:[ \t\n]+")
643 (let ((end (+ pos (length char-description)))) 646 (let* ((end (+ (point) (length char-description))))
644 (if overlays
645 (mapc #'(lambda (props) 647 (mapc #'(lambda (props)
646 (let ((o (make-overlay pos end))) 648 (let ((o (make-overlay (point) end)))
647 (while props 649 (while props
648 (overlay-put o (car props) (nth 1 props)) 650 (overlay-put o (car props) (nth 1 props))
649 (setq props (cddr props))))) 651 (setq props (cddr props)))))
650 overlays))) 652 overlays))))
651 653
652 (when disp-vector 654 (when disp-vector
653 (insert 655 (insert
@@ -720,7 +722,9 @@ as well as widgets, buttons, overlays, and text properties."
720 (insert "\nSee the variable `reference-point-alist' for " 722 (insert "\nSee the variable `reference-point-alist' for "
721 "the meaning of the rule.\n")) 723 "the meaning of the rule.\n"))
722 724
723 (describe-text-properties pos (current-buffer)) 725 (save-excursion
726 (set-buffer orig-buf)
727 (describe-text-properties pos help-buf))
724 (describe-text-mode))))) 728 (describe-text-mode)))))
725 729
726(defalias 'describe-char-after 'describe-char) 730(defalias 'describe-char-after 'describe-char)