From: Kenichi Handa Date: Wed, 9 Apr 2003 00:32:23 +0000 (+0000) Subject: (print-coding-system-briefly): If X-Git-Tag: ttn-vms-21-2-B4~10591 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=60b898c674e57707feb2f1edab0b92fc5008a7e6;p=emacs.git (print-coding-system-briefly): If DOC-STRING is `tightly', print the doc-string tightly. (list-coding-systems-1): Call print-coding-system-briefly with the arg DOC-STRING `tightly'. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d3a2dc2146a..f0f8092aafd 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,10 @@ +2003-04-09 Kenichi Handa + + * 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'. + 2003-04-08 Kai Gro,A_(Bjohann * net/tramp.el: Version 2.0.33 released. @@ -10,7 +17,7 @@ Do not disable file name handlers for `file-exists-p' and `file-directory-p'. -2003-04-08 Kenichi Handa +2003-04-08 Kenichi Handa * international/mule-conf.el: Register ?\225 in latin-extra-code-table. diff --git a/lisp/international/mule-diag.el b/lisp/international/mule-diag.el index de10d4c310f..930e98f08ba 100644 --- a/lisp/international/mule-diag.el +++ b/lisp/international/mule-diag.el @@ -760,6 +760,10 @@ in place of `..': ))) ;; 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,10 +784,16 @@ in place of `..': (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))))) + (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,7 +986,7 @@ but still contains full information about each coding system." ############################################### # List of coding systems in the following format: # MNEMONIC-LETTER -- CODING-SYSTEM-NAME -# DOC-STRING +# DOC-STRING ") (princ "\ ######################### @@ -1003,14 +1013,10 @@ but still contains full information about each coding system." ## 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))))) + (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 ()