diff options
| author | Dave Love | 2001-03-05 21:39:19 +0000 |
|---|---|---|
| committer | Dave Love | 2001-03-05 21:39:19 +0000 |
| commit | f53b2875f0935a8b735c87ea95ecc67eecd7aab7 (patch) | |
| tree | fcd86e4cc43cd1b63ef99bd1dc674048900a7018 | |
| parent | c89ac698623f84e3cfb2992e080275c20829e854 (diff) | |
| download | emacs-f53b2875f0935a8b735c87ea95ecc67eecd7aab7.tar.gz emacs-f53b2875f0935a8b735c87ea95ecc67eecd7aab7.zip | |
Fix last change.
| -rw-r--r-- | lisp/gnus/mm-util.el | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index 1f9e822cebe..529f568fcda 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el | |||
| @@ -27,44 +27,10 @@ | |||
| 27 | (eval-when-compile (require 'cl)) | 27 | (eval-when-compile (require 'cl)) |
| 28 | (require 'mail-prsvr) | 28 | (require 'mail-prsvr) |
| 29 | 29 | ||
| 30 | (eval-and-compile | 30 | (defun mm-coding-system-p (sym) |
| 31 | (mapcar | 31 | "Return non-nil if SYM is a coding system." |
| 32 | (lambda (elem) | 32 | (or (and (fboundp 'coding-system-p) (coding-system-p sym)) |
| 33 | (let ((nfunc (intern (format "mm-%s" (car elem))))) | 33 | (memq sym (mm-get-coding-system-list)))) |
| 34 | (if (fboundp (car elem)) | ||
| 35 | (defalias nfunc (car elem)) | ||
| 36 | (defalias nfunc (cdr elem))))) | ||
| 37 | '((decode-coding-string . (lambda (s a) s)) | ||
| 38 | (encode-coding-string . (lambda (s a) s)) | ||
| 39 | (encode-coding-region . ignore) | ||
| 40 | (coding-system-list . ignore) | ||
| 41 | (decode-coding-region . ignore) | ||
| 42 | (char-int . identity) | ||
| 43 | (device-type . ignore) | ||
| 44 | (coding-system-equal . equal) | ||
| 45 | (annotationp . ignore) | ||
| 46 | (set-buffer-file-coding-system . ignore) | ||
| 47 | (make-char | ||
| 48 | . (lambda (charset int) | ||
| 49 | (int-to-char int))) | ||
| 50 | (read-coding-system | ||
| 51 | . (lambda (prompt) | ||
| 52 | "Prompt the user for a coding system." | ||
| 53 | (completing-read | ||
| 54 | prompt (mapcar (lambda (s) (list (symbol-name (car s)))) | ||
| 55 | mm-mime-mule-charset-alist)))) | ||
| 56 | (read-charset | ||
| 57 | . (lambda (prompt) | ||
| 58 | "Return a charset." | ||
| 59 | (intern | ||
| 60 | (completing-read | ||
| 61 | prompt | ||
| 62 | (mapcar (lambda (e) (list (symbol-name (car e)))) | ||
| 63 | mm-mime-mule-charset-alist) | ||
| 64 | nil t)))) | ||
| 65 | (string-as-unibyte . identity) | ||
| 66 | (multibyte-string-p . ignore) | ||
| 67 | ))) | ||
| 68 | 34 | ||
| 69 | (defvar mm-mime-mule-charset-alist | 35 | (defvar mm-mime-mule-charset-alist |
| 70 | `((us-ascii ascii) | 36 | `((us-ascii ascii) |
| @@ -119,6 +85,45 @@ | |||
| 119 | "Alist of MIME-charset/MULE-charsets.") | 85 | "Alist of MIME-charset/MULE-charsets.") |
| 120 | 86 | ||
| 121 | (eval-and-compile | 87 | (eval-and-compile |
| 88 | (mapcar | ||
| 89 | (lambda (elem) | ||
| 90 | (let ((nfunc (intern (format "mm-%s" (car elem))))) | ||
| 91 | (if (fboundp (car elem)) | ||
| 92 | (defalias nfunc (car elem)) | ||
| 93 | (defalias nfunc (cdr elem))))) | ||
| 94 | '((decode-coding-string . (lambda (s a) s)) | ||
| 95 | (encode-coding-string . (lambda (s a) s)) | ||
| 96 | (encode-coding-region . ignore) | ||
| 97 | (coding-system-list . ignore) | ||
| 98 | (decode-coding-region . ignore) | ||
| 99 | (char-int . identity) | ||
| 100 | (device-type . ignore) | ||
| 101 | (coding-system-equal . equal) | ||
| 102 | (annotationp . ignore) | ||
| 103 | (set-buffer-file-coding-system . ignore) | ||
| 104 | (make-char | ||
| 105 | . (lambda (charset int) | ||
| 106 | (int-to-char int))) | ||
| 107 | (read-coding-system | ||
| 108 | . (lambda (prompt) | ||
| 109 | "Prompt the user for a coding system." | ||
| 110 | (completing-read | ||
| 111 | prompt (mapcar (lambda (s) (list (symbol-name (car s)))) | ||
| 112 | mm-mime-mule-charset-alist)))) | ||
| 113 | (read-charset | ||
| 114 | . (lambda (prompt) | ||
| 115 | "Return a charset." | ||
| 116 | (intern | ||
| 117 | (completing-read | ||
| 118 | prompt | ||
| 119 | (mapcar (lambda (e) (list (symbol-name (car e)))) | ||
| 120 | mm-mime-mule-charset-alist) | ||
| 121 | nil t)))) | ||
| 122 | (string-as-unibyte . identity) | ||
| 123 | (multibyte-string-p . ignore) | ||
| 124 | ))) | ||
| 125 | |||
| 126 | (eval-and-compile | ||
| 122 | (defalias 'mm-char-or-char-int-p | 127 | (defalias 'mm-char-or-char-int-p |
| 123 | (cond | 128 | (cond |
| 124 | ((fboundp 'char-or-char-int-p) 'char-or-char-int-p) | 129 | ((fboundp 'char-or-char-int-p) 'char-or-char-int-p) |
| @@ -131,11 +136,6 @@ | |||
| 131 | (or mm-coding-system-list | 136 | (or mm-coding-system-list |
| 132 | (setq mm-coding-system-list (mm-coding-system-list)))) | 137 | (setq mm-coding-system-list (mm-coding-system-list)))) |
| 133 | 138 | ||
| 134 | (defun mm-coding-system-p (sym) | ||
| 135 | "Return non-nil if SYM is a coding system." | ||
| 136 | (or (and (fboundp 'coding-system-p) (coding-system-p sym)) | ||
| 137 | (memq sym (mm-get-coding-system-list)))) | ||
| 138 | |||
| 139 | (defvar mm-charset-synonym-alist | 139 | (defvar mm-charset-synonym-alist |
| 140 | `((big5 . cn-big5) | 140 | `((big5 . cn-big5) |
| 141 | (gb2312 . cn-gb-2312) | 141 | (gb2312 . cn-gb-2312) |