bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: list charset stuff needs buffer name other than *Help*


From: Kenichi Handa
Subject: Re: list charset stuff needs buffer name other than *Help*
Date: Wed, 25 Sep 2002 17:53:46 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.1.30 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <87k7ldtt8f.fsf@jidanni.org>, Dan Jacobson <jidanni@dman.ddts.net> 
writes:
> It is very bad for the user to have gone thru the trouble of going
> thru the help menus till he finally gets to seeing the table
> "Characters in the charset chinese-big5-1."  and then have that all be
> wiped away when he executes the next help command.  Therefore that
> character set stuff should be put in a different buffer than *Help*.
> Indeed, the buffer that starts with

> Use <mouse-2> or C-c C-c:
>   on a column title to sort by that title,
>   on a charset name to list characters.

> should already have a different name than *Help*

Thank you for a good suggestion.  I've just installed the
attached changes.

> By the way, (after changing the name of the buffer, of course), I did
> C-u C-x = on a certain char. and found that none of the many numbers
> below was like the one on that row, "217x", in the "Characters in the
> charset chinese-big5-1" table.

chinese-big5-1/2 are the charsets invented by Emacs to
support Big5.  Big5 characters are mapped to these charsets
in Emacs.  Thus, 217x are the code-points of chinese-big5-1/2,
not those of Big5 itself.

If you want to see the real code-points of Big5, please do:
M-x list-charset-chars RET big5 RET.

By the way, I made M-x list-character-sets to list
also indirectly supported charsets such as Big5.

---
Ken'ichi HANDA
handa@etl.go.jp

2002-09-25  Kenichi Handa  <handa@etl.go.jp>

        * international/mule-diag.el (list-character-sets): Use the buffer
        name "*Character Set List*", not "*Help*".  List also indirectly
        supported character sets.
        (list-charset-chars): Use the buffer name "*Character List*", not
        "*Help*".  Display the current charset name in the modeline.
        (non-iso-charset-alist): Add mapped charset list for `mac-roman'.
        (sort-listed-character-sets): Don't alter the region showing
        indirectly supported charsets.

Index: mule-diag.el
===================================================================
RCS file: /cvs/emacs/lisp/international/mule-diag.el,v
retrieving revision 1.79
diff -u -c -r1.79 mule-diag.el
cvs server: conflicting specifications of output style
*** mule-diag.el        19 Sep 2002 05:06:16 -0000      1.79
--- mule-diag.el        25 Sep 2002 08:50:43 -0000
***************
*** 84,94 ****
  but still shows the full information."
    (interactive "P")
    (help-setup-xref (list #'list-character-sets arg) (interactive-p))
!   (with-output-to-temp-buffer (help-buffer)
      (with-current-buffer standard-output
        (if arg
          (list-character-sets-2)
        ;; Insert header.
        (insert
         (substitute-command-keys
          (concat "Use "
--- 84,95 ----
  but still shows the full information."
    (interactive "P")
    (help-setup-xref (list #'list-character-sets arg) (interactive-p))
!   (with-output-to-temp-buffer "*Character Set List*"
      (with-current-buffer standard-output
        (if arg
          (list-character-sets-2)
        ;; Insert header.
+       (insert "Indirectly supported character sets are shown below.\n")
        (insert
         (substitute-command-keys
          (concat "Use "
***************
*** 117,123 ****
        (insert "------\t------------\t\t\t--------------\t- -- ----------\n")
  
        ;; Insert body sorted by charset IDs.
!       (list-character-sets-1 'id)))))
  
  (defun sort-listed-character-sets (sort-key)
    (if sort-key
--- 118,145 ----
        (insert "------\t------------\t\t\t--------------\t- -- ----------\n")
  
        ;; Insert body sorted by charset IDs.
!       (list-character-sets-1 'id)
! 
!       ;; Insert non-directly-supported charsets.
!       (insert-char ?- 72)
!       (insert "\n\nINDIRECTLY SUPPORTED CHARSETS SETS:\n\n"
!               (propertize "CHARSET NAME\tMAPPED TO" 'face 'bold)
!               "\n------------\t---------\n")
!       (dolist (elt non-iso-charset-alist)
!         (insert-text-button (symbol-name (car elt))
!                             :type 'list-charset-chars
!                             'help-args (list (car elt)))
!         (indent-to 16)
!         (dolist (e (nth 1 elt))
!           (when (>= (+ (current-column) 1 (string-width (symbol-name e)))
!                     ;; This is an approximate value.  We don't know
!                     ;; the correct window width of this buffer yet.
!                     78)
!             (insert "\n")
!             (indent-to 16))
! 
!           (insert (format "%s " e)))
!         (insert "\n"))))))
  
  (defun sort-listed-character-sets (sort-key)
    (if sort-key
***************
*** 127,134 ****
          (goto-char (point-min))
          (re-search-forward "[0-9][0-9][0-9]")
          (beginning-of-line)
!         (delete-region (point) (point-max))
!         (list-character-sets-1 sort-key)))))
  
  (defun charset-multibyte-form-string (charset)
    (let ((info (charset-info charset)))
--- 149,161 ----
          (goto-char (point-min))
          (re-search-forward "[0-9][0-9][0-9]")
          (beginning-of-line)
!         (let ((pos (point)))
!           (search-forward "----------")
!           (beginning-of-line)
!           (save-restriction
!             (narrow-to-region pos (point))
!             (delete-region (point-min) (point-max))
!             (list-character-sets-1 sort-key)))))))
  
  (defun charset-multibyte-form-string (charset)
    (let ((info (charset-info charset)))
***************
*** 249,255 ****
  
  (defvar non-iso-charset-alist
    `((mac-roman
!      nil
       mac-roman-decoder
       ((0 255)))
      (viscii
--- 276,283 ----
  
  (defvar non-iso-charset-alist
    `((mac-roman
!      (ascii latin-iso8859-1 mule-unicode-2500-33ff
!           mule-unicode-0100-24ff mule-unicode-e000-ffff)
       mac-roman-decoder
       ((0 255)))
      (viscii
***************
*** 487,494 ****
  characters encoded by various Emacs coding systems which correspond to
  PC `codepages' and other coded character sets.  See `non-iso-charset-alist'."
    (interactive (list (read-charset "Character set: ")))
!   (with-output-to-temp-buffer "*Help*"
      (with-current-buffer standard-output
        (setq indent-tabs-mode nil)
        (set-buffer-multibyte t)
        (cond ((charsetp charset)
--- 515,528 ----
  characters encoded by various Emacs coding systems which correspond to
  PC `codepages' and other coded character sets.  See `non-iso-charset-alist'."
    (interactive (list (read-charset "Character set: ")))
!   (with-output-to-temp-buffer "*Character List*"
      (with-current-buffer standard-output
+       (setq mode-line-format (copy-sequence mode-line-format))
+       (let ((slot (memq 'mode-line-buffer-identification mode-line-format)))
+       (if slot
+           (setcdr slot
+                   (cons (format " (%s)" charset)
+                         (cdr slot)))))
        (setq indent-tabs-mode nil)
        (set-buffer-multibyte t)
        (cond ((charsetp charset)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]