[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: reverting CJK input methods
From: |
Juri Linkov |
Subject: |
Re: reverting CJK input methods |
Date: |
Fri, 30 Apr 2004 14:27:45 +0300 |
User-agent: |
Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux) |
Miles Bader <address@hidden> writes:
> I think this would be nice to add to the output for `C-u C-x ='.
>
> character: ö (04366, 2294, 0x8f6, U+00F6)
> charset: latin-iso8859-1
> (Right-Hand Part of Latin Alphabet 1 (ISO/IEC 8859-1): ISO-IR-100.)
> ...
> keystroke: ö can be input by typing ";"
> (using the `german' input method)
> ...
This would be very useful.
BTW, another useful feature of `describe-char' is the ability
to display information on a character displayed in the *Help*
buffer itself.
The recent changes in descr-text.el allow to do this, but buttons
in the *Help* buffer become broken, because only text properties
are copied, but not overlays. To avoid problems of self-referencing
to the same buffer, I propose to display information on characters of
the *Help* buffer in a separate buffer whose name is generated by
`(generate-new-buffer-name "*Help*")':
Index: lisp/descr-text.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/descr-text.el,v
retrieving revision 1.21
diff -u -r1.21 descr-text.el
--- lisp/descr-text.el 21 Apr 2004 01:25:17 -0000 1.21
+++ lisp/descr-text.el 30 Apr 2004 11:04:11 -0000
@@ -474,7 +474,6 @@
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
@@ -583,15 +582,10 @@
(cons (list "Unicode data" " ") unicodedata))))))
(setq max-width (apply #'max (mapcar #'(lambda (x) (length (car x)))
item-list)))
- (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-output-to-temp-buffer
+ (if (eq (current-buffer) (get-buffer "*Help*"))
+ (generate-new-buffer-name "*Help*")
+ "*Help*")
(with-current-buffer standard-output
(set-buffer-multibyte multibyte-p)
(let ((formatter (format "%%%ds:" max-width)))
@@ -665,8 +659,10 @@
(insert "\nSee the variable `reference-point-alist' for "
"the meaning of the rule.\n"))
- (insert text-prop-description)
- (describe-text-mode)))))
+ (let ((output (current-buffer)))
+ (with-current-buffer buffer
+ (describe-text-properties pos output))
+ (describe-text-mode))))))
(defalias 'describe-char-after 'describe-char)
(make-obsolete 'describe-char-after 'describe-char "21.5")
--
Juri Linkov
http://www.jurta.org/emacs/