From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Kenichi Handa Newsgroups: gmane.emacs.devel Subject: Re: reverting CJK input methods Date: Fri, 30 Apr 2004 22:26:18 +0900 (JST) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200404301326.WAA02744@etlken.m17n.org> References: <20040429.150303.42778779.wl@gnu.org> <200404300142.KAA01027@etlken.m17n.org> <87u0z1puxa.fsf@mail.jurta.org> NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 (generated by SEMI 1.14.3 - "Ushinoya") Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1083335172 16868 80.91.224.253 (30 Apr 2004 14:26:12 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 30 Apr 2004 14:26:12 +0000 (UTC) Cc: emacs-devel@gnu.org, miles@gnu.org Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Fri Apr 30 16:26:02 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1BJYxm-0000Kx-00 for ; Fri, 30 Apr 2004 16:26:02 +0200 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1BJYxl-00051d-00 for ; Fri, 30 Apr 2004 16:26:01 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BJYxA-0000fk-Ko for emacs-devel@quimby.gnus.org; Fri, 30 Apr 2004 10:25:24 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1BJYo3-00072Q-35 for emacs-devel@gnu.org; Fri, 30 Apr 2004 10:15:59 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1BJYB1-0007z9-0B for emacs-devel@gnu.org; Fri, 30 Apr 2004 09:36:10 -0400 Original-Received: from [192.47.44.130] (helo=tsukuba.m17n.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1BJY24-0006Rx-Ai; Fri, 30 Apr 2004 09:26:24 -0400 Original-Received: from fs.m17n.org (fs.m17n.org [192.47.44.2]) by tsukuba.m17n.org (8.11.6p2/8.11.6) with ESMTP id i3UDQJ813432; Fri, 30 Apr 2004 22:26:19 +0900 (JST) Original-Received: from etlken.m17n.org (etlken.m17n.org [192.47.44.125]) by fs.m17n.org (8.11.6p2/8.11.6) with ESMTP id i3UDQI918174; Fri, 30 Apr 2004 22:26:18 +0900 (JST) Original-Received: (from handa@localhost) by etlken.m17n.org (8.8.8+Sun/3.7W-2001040620) id WAA02744; Fri, 30 Apr 2004 22:26:18 +0900 (JST) Original-To: juri@jurta.org In-reply-to: <87u0z1puxa.fsf@mail.jurta.org> (message from Juri Linkov on Fri, 30 Apr 2004 14:27:45 +0300) User-Agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.3 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.4 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:22440 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:22440 In article <87u0z1puxa.fsf@mail.jurta.org>, Juri Linkov wr= ites: > Miles Bader writes: >> I think this would be nice to add to the output for `C-u C-x =3D'. >>=20 >> character: =F6 (04366, 2294, 0x8f6, U+00F6) >> charset: latin-iso8859-1 >> (Right-Hand Part of Latin Alphabet 1 (ISO/IEC 8859-1): ISO-IR-100= .) >> ... >> keystroke: =F6 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*")': Ah, I didn't notice that failure. How about the attached change instead? Perhaps we should also setup "[back]" widget, but I forgot how to do that. :-( --- Ken'ichi HANDA handa@m17n.org *** descr-text.el 21 Apr 2004 10:22:12 +0900 1.21 --- descr-text.el 30 Apr 2004 22:19:22 +0900=09 *************** *** 465,470 **** --- 465,471 ---- (if (>=3D pos (point-max)) (error "No character follows specified position")) (let* ((char (char-after pos)) + (char-string (buffer-substring pos (1+ pos))) (charset (char-charset char)) (buffer (current-buffer)) (composition (find-composition pos nil nil t)) *************** *** 474,489 **** 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 ! `(("character" ! ,(format "%s (0%o, %d, 0x%x) -- invalid character code" ! (if (< char 256) ! (single-key-description char) ! (char-to-string char)) ! char char char)))) =20 (if (or (< char 256) (memq 'mule-utf-8 (find-coding-systems-region pos (1+ pos))) --- 475,485 ---- standard-display-table)) (disp-vector (and display-table (aref display-table char))) (multibyte-p enable-multibyte-characters) ! (overlays (mapcar #'(lambda (o) (overlay-properties o)) ! (overlays-at pos))) item-list max-width unicode) (if (eq charset 'unknown) ! (setq item-list '"character") =20 (if (or (< char 256) (memq 'mule-utf-8 (find-coding-systems-region pos (1+ pos))) *************** *** 491,504 **** (setq unicode (or (get-char-property pos 'untranslated-utf-8) (encode-char char 'ucs)))) (setq item-list ! `(("character" ! ,(format "%s (0%o, %d, 0x%x%s)" (if (< char 256) ! (single-key-description char) ! (char-to-string char)) ! char char char ! (if unicode ! (format ", U+%04X" unicode) ! ""))) ("charset" ,(symbol-name charset) ,(format "(%s)" (charset-description charset))) --- 487,493 ---- (setq unicode (or (get-char-property pos 'untranslated-utf-8) (encode-char char 'ucs)))) (setq item-list ! `(("character") ("charset" ,(symbol-name charset) ,(format "(%s)" (charset-description charset))) *************** *** 583,600 **** (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))) =20 (with-output-to-temp-buffer "*Help*" (with-current-buffer standard-output (set-buffer-multibyte multibyte-p) (let ((formatter (format "%%%ds:" max-width))) (dolist (elt item-list) (when (cadr elt) (insert (format formatter (car elt))) --- 572,602 ---- (cons (list "Unicode data" " ") unicodedata)))))) (setq max-width (apply #'max (mapcar #'(lambda (x) (length (car x))) item-list))) ! (pop item-list) =20 (with-output-to-temp-buffer "*Help*" (with-current-buffer standard-output (set-buffer-multibyte multibyte-p) (let ((formatter (format "%%%ds:" max-width))) + (insert (format formatter "character") " ") + (setq pos (point)) + (insert char-string + (format " (`%s', 0%o, %d, 0x%x" + (if (< char 256) + (single-key-description char) + (char-to-string char)) + char char char) + (if (eq charset 'unknown) + ") -- invalid character code\n" + (if unicode + (format ", U+%04X)\n" unicode) + ")\n"))) + (mapc #'(lambda (props) + (let ((o (make-overlay pos (1+ pos)))) + (while props + (overlay-put o (car props) (nth 1 props)) + (setq props (cddr props))))) + overlays) (dolist (elt item-list) (when (cadr elt) (insert (format formatter (car elt))) *************** *** 665,671 **** (insert "\nSee the variable `reference-point-alist' for " "the meaning of the rule.\n")) =20 ! (insert text-prop-description) (describe-text-mode))))) =20 (defalias 'describe-char-after 'describe-char) --- 667,673 ---- (insert "\nSee the variable `reference-point-alist' for " "the meaning of the rule.\n")) =20 ! (describe-text-properties pos (current-buffer)) (describe-text-mode))))) =20 (defalias 'describe-char-after 'describe-char)