diff options
| author | Kenichi Handa | 2006-10-17 11:45:46 +0000 |
|---|---|---|
| committer | Kenichi Handa | 2006-10-17 11:45:46 +0000 |
| commit | 4f06ffe15bfb8cb8f939d4adfb5bfbd534495f7b (patch) | |
| tree | 6a4996c290fe46392151d4e92fd573c47ae83ef7 | |
| parent | d504c23f4c1a43765718098dd30946bfe3d3b096 (diff) | |
| download | emacs-4f06ffe15bfb8cb8f939d4adfb5bfbd534495f7b.tar.gz emacs-4f06ffe15bfb8cb8f939d4adfb5bfbd534495f7b.zip | |
(coding-system-list): Be sure to exclude
subsidiary coding systems.
| -rw-r--r-- | lisp/international/mule.el | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 06c863916db..5f3aebc78db 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el | |||
| @@ -910,20 +910,13 @@ If optional arg BASE-ONLY is non-nil, only base coding systems are | |||
| 910 | listed. The value doesn't include subsidiary coding systems which are | 910 | listed. The value doesn't include subsidiary coding systems which are |
| 911 | made from bases and aliases automatically for various end-of-line | 911 | made from bases and aliases automatically for various end-of-line |
| 912 | formats (e.g. iso-latin-1-unix, koi8-r-dos)." | 912 | formats (e.g. iso-latin-1-unix, koi8-r-dos)." |
| 913 | (let* ((codings (copy-sequence coding-system-list)) | 913 | (let ((codings nil)) |
| 914 | (tail (cons nil codings))) | 914 | (dolist (coding coding-system-list) |
| 915 | ;; Remove subsidiary coding systems (eol variants) and alias | 915 | (if (eq (coding-system-base coding) coding) |
| 916 | ;; coding systems (if necessary). | 916 | (if base-only |
| 917 | (while (cdr tail) | 917 | (setq codings (cons coding codings)) |
| 918 | (let* ((coding (car (cdr tail))) | 918 | (dolist (alias (coding-system-aliases coding)) |
| 919 | (aliases (coding-system-aliases coding))) | 919 | (setq codings (cons alias codings)))))) |
| 920 | (if (or | ||
| 921 | ;; CODING is an eol variant if not in ALIASES. | ||
| 922 | (not (memq coding aliases)) | ||
| 923 | ;; CODING is an alias if it is not car of ALIASES. | ||
| 924 | (and base-only (not (eq coding (car aliases))))) | ||
| 925 | (setcdr tail (cdr (cdr tail))) | ||
| 926 | (setq tail (cdr tail))))) | ||
| 927 | codings)) | 920 | codings)) |
| 928 | 921 | ||
| 929 | (defconst char-coding-system-table nil | 922 | (defconst char-coding-system-table nil |