Mercurial > emacs
comparison lisp/international/mule-util.el @ 24277:b6fcff552040
(coding-system-list): Don't sort
coding-system-list here.
author | Andreas Schwab <schwab@suse.de> |
---|---|
date | Mon, 08 Feb 1999 09:52:43 +0000 |
parents | 98056b9021a6 |
children | 3e873a016458 |
comparison
equal
deleted
inserted
replaced
24276:ec0195eb2657 | 24277:b6fcff552040 |
---|---|
238 ;;;###autoload | 238 ;;;###autoload |
239 (defun coding-system-translation-table-for-encode (coding-system) | 239 (defun coding-system-translation-table-for-encode (coding-system) |
240 "Return the value of CODING-SYSTEM's translation-table-for-encode property." | 240 "Return the value of CODING-SYSTEM's translation-table-for-encode property." |
241 (coding-system-get coding-system 'translation-table-for-encode)) | 241 (coding-system-get coding-system 'translation-table-for-encode)) |
242 | 242 |
243 (defun coding-system-lessp (x y) | |
244 (cond ((eq x 'no-conversion) t) | |
245 ((eq y 'no-conversion) nil) | |
246 ((eq x 'emacs-mule) t) | |
247 ((eq y 'emacs-mule) nil) | |
248 ((eq x 'undecided) t) | |
249 ((eq y 'undecided) nil) | |
250 (t (let ((c1 (coding-system-mnemonic x)) | |
251 (c2 (coding-system-mnemonic y))) | |
252 (or (< (downcase c1) (downcase c2)) | |
253 (and (not (> (downcase c1) (downcase c2))) | |
254 (< c1 c2))))))) | |
255 | |
256 ;;;###autoload | 243 ;;;###autoload |
257 (defun coding-system-list (&optional base-only) | 244 (defun coding-system-list (&optional base-only) |
258 "Return a list of all existing coding systems. | 245 "Return a list of all existing coding systems. |
259 If optional arg BASE-ONLY is non-nil, only base coding systems are listed." | 246 If optional arg BASE-ONLY is non-nil, only base coding systems are listed." |
260 (let* ((codings (sort (copy-sequence coding-system-list) | 247 (let* ((codings (copy-sequence coding-system-list)) |
261 'coding-system-lessp)) | |
262 (tail (cons nil codings))) | 248 (tail (cons nil codings))) |
263 ;; Remove subsidiary coding systems (eol variants) and alias | 249 ;; Remove subsidiary coding systems (eol variants) and alias |
264 ;; coding systems (if necessary). | 250 ;; coding systems (if necessary). |
265 (while (cdr tail) | 251 (while (cdr tail) |
266 (let* ((coding (car (cdr tail))) | 252 (let* ((coding (car (cdr tail))) |