Commit 086c5b2b authored by Kenichi Handa's avatar Kenichi Handa
Browse files

(describe-char): Use *Help-2* buffer if the

current buffer is *Help*.  Call describe-text-properties while
setting the original buffer.
parent 4af6c011
2005-12-08 Kenichi Handa <handa@m17n.org>
* descr-text.el (describe-char): Use *Help-2* buffer if the
current buffer is *Help*. Call describe-text-properties while
setting the original buffer.
2005-12-07 Bill Wohler <wohler@newt.com> 2005-12-07 Bill Wohler <wohler@newt.com>
   
* files.el (auto-mode-alist): Remove mh-letter-mode. Unnecessary, * files.el (auto-mode-alist): Remove mh-letter-mode. Unnecessary,
......
...@@ -464,6 +464,9 @@ as well as widgets, buttons, overlays, and text properties." ...@@ -464,6 +464,9 @@ as well as widgets, buttons, overlays, and text properties."
(single-key-description char) (single-key-description char)
(string-to-multibyte (string-to-multibyte
(char-to-string char))))) (char-to-string char)))))
(orig-buf (current-buffer))
(help-buf (if (eq orig-buf (get-buffer "*Help*"))
"*Help-2*" "*Help*"))
item-list max-width unicode) item-list max-width unicode)
(if (or (< char 256) (if (or (< char 256)
...@@ -616,7 +619,7 @@ as well as widgets, buttons, overlays, and text properties." ...@@ -616,7 +619,7 @@ as well as widgets, buttons, overlays, and text properties."
(setq max-width (apply #'max (mapcar #'(lambda (x) (setq max-width (apply #'max (mapcar #'(lambda (x)
(if (cadr x) (length (car x)) 0)) (if (cadr x) (length (car x)) 0))
item-list))) item-list)))
(with-output-to-temp-buffer "*Help*" (with-output-to-temp-buffer help-buf
(with-current-buffer standard-output (with-current-buffer standard-output
(set-buffer-multibyte multibyte-p) (set-buffer-multibyte multibyte-p)
(let ((formatter (format "%%%ds:" max-width))) (let ((formatter (format "%%%ds:" max-width)))
...@@ -636,18 +639,17 @@ as well as widgets, buttons, overlays, and text properties." ...@@ -636,18 +639,17 @@ as well as widgets, buttons, overlays, and text properties."
(insert " " clm))) (insert " " clm)))
(insert "\n")))) (insert "\n"))))
(save-excursion (when overlays
(goto-char (point-min)) (save-excursion
(re-search-forward "character:[ \t\n]+") (goto-char (point-min))
(setq pos (point))) (re-search-forward "character:[ \t\n]+")
(let ((end (+ pos (length char-description)))) (let* ((end (+ (point) (length char-description))))
(if overlays
(mapc #'(lambda (props) (mapc #'(lambda (props)
(let ((o (make-overlay pos end))) (let ((o (make-overlay (point) end)))
(while props (while props
(overlay-put o (car props) (nth 1 props)) (overlay-put o (car props) (nth 1 props))
(setq props (cddr props))))) (setq props (cddr props)))))
overlays))) overlays))))
(when disp-vector (when disp-vector
(insert (insert
...@@ -720,7 +722,9 @@ as well as widgets, buttons, overlays, and text properties." ...@@ -720,7 +722,9 @@ as well as widgets, buttons, overlays, and text properties."
(insert "\nSee the variable `reference-point-alist' for " (insert "\nSee the variable `reference-point-alist' for "
"the meaning of the rule.\n")) "the meaning of the rule.\n"))
(describe-text-properties pos (current-buffer)) (save-excursion
(set-buffer orig-buf)
(describe-text-properties pos help-buf))
(describe-text-mode))))) (describe-text-mode)))))
(defalias 'describe-char-after 'describe-char) (defalias 'describe-char-after 'describe-char)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment