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

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

Re: [patch] `list-coding-systems' output


From: Kenichi Handa
Subject: Re: [patch] `list-coding-systems' output
Date: Wed, 9 Apr 2003 09:33:40 +0900 (JST)
User-agent: SEMI/1.14.3 (Ushinoya) FLIM/1.14.2 (Yagi-Nishiguchi) APEL/10.2 Emacs/21.2.92 (sparc-sun-solaris2.6) MULE/5.0 (SAKAKI)

In article <address@hidden>, Jesper Harder <address@hidden> writes:
> I think the output from `list-coding-systems' is a little confusing
> because the description of a coding system is grouped with the next
> coding system:

> ,----
> | Q -- tibetan-iso-8bit (alias: tibetan)
> | 
> | 8-bit encoding for ASCII (MSB=0) and TIBETAN (MSB=1).
> | q -- vietnamese-viqr (alias: viqr)
> | 
> | Vietnamese latin transcription (VIQR)
> | R -- cyrillic-koi8 (alias: koi8-r koi8 cp878)
> | 
> | KOI8-R 8-bit encoding for Cyrillic (MIME: KOI8-R).
> `----

> Wouldn't it be clearer if the blank line was inserted after the
> description instead:

Thank you for the report.  I've just installed the attached
change.  How about it?

---
Ken'ichi HANDA
address@hidden

2003-04-09  Kenichi Handa  <address@hidden>

        * international/mule-diag.el (print-coding-system-briefly): If
        DOC-STRING is `tightly', print the doc-string tightly.
        (list-coding-systems-1): Sort coding systems.  Call
        print-coding-system-briefly with the arg DOC-STRING `tightly'.

Index: mule-diag.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/international/mule-diag.el,v
retrieving revision 1.86
retrieving revision 1.87
diff -u -c -r1.86 -r1.87
cvs server: conflicting specifications of output style
*** mule-diag.el        20 Feb 2003 08:43:04 -0000      1.86
--- mule-diag.el        9 Apr 2003 00:27:58 -0000       1.87
***************
*** 760,765 ****
--- 760,769 ----
       )))
  
  ;; Print symbol name and mnemonic letter of CODING-SYSTEM with `princ'.
+ ;; If DOC-STRING is non-nil, print also the docstring of CODING-SYSTEM.
+ ;; If DOC-STRING is `tightly', don't print an empty line before the
+ ;; docstring, and print only the first line of the docstring.
+ 
  (defun print-coding-system-briefly (coding-system &optional doc-string)
    (if (not coding-system)
        (princ "nil\n")
***************
*** 780,789 ****
                        (not (eq coding-system (aref base-eol-type eol-type))))
                   (princ (format " (alias of %s)"
                                  (aref base-eol-type eol-type))))))))
!     (princ "\n\n")
!     (if (and doc-string
!            (setq doc-string (coding-system-doc-string coding-system)))
!       (princ (format "%s\n" doc-string)))))
  
  ;;;###autoload
  (defun describe-current-coding-system ()
--- 784,799 ----
                        (not (eq coding-system (aref base-eol-type eol-type))))
                   (princ (format " (alias of %s)"
                                  (aref base-eol-type eol-type))))))))
!     (princ "\n")
!     (or (eq doc-string 'tightly)
!       (princ "\n"))
!     (if doc-string
!       (let ((doc (or (coding-system-doc-string coding-system) "")))
!         (when (eq doc-string 'tightly)
!           (if (string-match "\n" doc)
!               (setq doc (substring doc 0 (match-beginning 0))))
!           (setq doc (concat "  " doc)))
!         (princ (format "%s\n" doc))))))
  
  ;;;###autoload
  (defun describe-current-coding-system ()
***************
*** 976,982 ****
  ###############################################
  # List of coding systems in the following format:
  # MNEMONIC-LETTER -- CODING-SYSTEM-NAME
! #     DOC-STRING
  ")
      (princ "\
  #########################
--- 986,992 ----
  ###############################################
  # List of coding systems in the following format:
  # MNEMONIC-LETTER -- CODING-SYSTEM-NAME
! #   DOC-STRING
  ")
      (princ "\
  #########################
***************
*** 1003,1016 ****
  ##  POST-READ-CONVERSION, PRE-WRITE-CONVERSION = function name to be called
  ##
  "))
!   (let ((bases (coding-system-list 'base-only))
!       coding-system)
!     (while bases
!       (setq coding-system (car bases))
!       (if (null arg)
!         (print-coding-system-briefly coding-system 'doc-string)
!       (print-coding-system coding-system))
!       (setq bases (cdr bases)))))
  
  ;;;###autoload
  (defun list-coding-categories ()
--- 1013,1022 ----
  ##  POST-READ-CONVERSION, PRE-WRITE-CONVERSION = function name to be called
  ##
  "))
!   (dolist (coding-system (sort-coding-systems (coding-system-list 
'base-only)))
!     (if (null arg)
!       (print-coding-system-briefly coding-system 'tightly)
!       (print-coding-system coding-system))))
  
  ;;;###autoload
  (defun list-coding-categories ()




reply via email to

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