unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Kenichi Handa <handa@m17n.org>
Cc: bug-gnu-emacs@gnu.org
Subject: Re: list charset stuff needs buffer name other than *Help*
Date: Wed, 25 Sep 2002 17:53:46 +0900 (JST)	[thread overview]
Message-ID: <200209250853.RAA11100@etlken.m17n.org> (raw)
In-Reply-To: <87k7ldtt8f.fsf@jidanni.org> (message from Dan Jacobson on 23 Sep 2002 09:00:48 +0800)

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	other threads:[~2002-09-25  8:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-09-23  1:00 list charset stuff needs buffer name other than *Help* Dan Jacobson
2002-09-25  8:53 ` Kenichi Handa [this message]
2002-09-25 21:37   ` Dan Jacobson
2002-10-02 12:59     ` Kenichi Handa
2002-10-02 15:34       ` can't get native charset codes from mule menu Dan Jacobson
2002-10-04  5:56         ` Kenichi Handa
2002-10-07  4:40           ` Dan Jacobson
2002-10-08  2:18             ` Kenichi Handa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200209250853.RAA11100@etlken.m17n.org \
    --to=handa@m17n.org \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).