(string-as-unibyte . identity)
(string-as-multibyte . identity)
(multibyte-string-p . ignore)
- (insert-byte . insert))))
+ (point-at-bol . line-beginning-position)
+ (point-at-eol . line-end-position)
+ (insert-byte . insert-char)
+ (multibyte-char-to-unibyte . identity))))
(eval-and-compile
(defalias 'mm-char-or-char-int-p
,@(unless (mm-coding-system-p 'gb2312)
'((gb2312 . cn-gb-2312)))
;; ISO-8859-15 is very similar to ISO-8859-1.
+ ;; But this is just wrong. --fx
,@(unless (mm-coding-system-p 'iso-8859-15) ; Emacs 21 defines it.
'((iso-8859-15 . iso-8859-1)))
;; Windows-1252 is actually a superset of Latin-1. See also
;; `gnus-article-dumbquotes-map'.
- ,@(unless (mm-coding-system-p 'windows-1252)
+ ,@(unless (mm-coding-system-p 'windows-1252)
(if (mm-coding-system-p 'cp1252)
'((windows-1252 . cp1252))
'((windows-1252 . iso-8859-1))))
;; Windows-1250 is a variant of Latin-2 heavily used by Microsoft
;; Outlook users in Czech republic. Use this to allow reading of their
;; e-mails. cp1250 should be defined by M-x codepage-setup.
+
+ ;; This is not TRT, the MIME name, windows-1250, should be an
+ ;; alias, and cp1250 should have a mime-charset property, per
+ ;; code-page.el. -- fx
,@(if (and (not (mm-coding-system-p 'windows-1250))
(mm-coding-system-p 'cp1250))
'((windows-1250 . cp1250)))
'(iso-2022-jp iso-2022-jp-2 japanese-shift-jis utf-8))
")
+;; Why on earth was this broken out? -- fx
(defvar mm-use-find-coding-systems-region
(fboundp 'find-coding-systems-region)
"Use `find-coding-systems-region' to find proper coding systems.")
;; system that has one.
(let ((systems (find-coding-systems-region b e)))
(when mm-coding-system-priorities
- (setq systems
+ (setq systems
(sort systems 'mm-sort-coding-systems-predicate)))
;; Fixme: The `mime-charset' (`x-ctext') of `compound-text'
;; is not in the IANA list.
;; Otherwise we're not multibyte, XEmacs or a single coding
;; system won't cover it.
- (setq charsets
+ (setq charsets
(mm-delete-duplicates
(mapcar 'mm-mime-charset
(delq 'ascii
Equivalent to `progn' in XEmacs"
(let ((multibyte (make-symbol "multibyte"))
(buffer (make-symbol "buffer")))
- `(if mm-emacs-mule
+ `(if mm-emacs-mule
(let ((,multibyte enable-multibyte-characters)
(,buffer (current-buffer)))
(unwind-protect
(push dir result))
(push path result))))
+;; It is not a MIME function, but some MIME functions use it.
+(defalias 'mm-make-temp-file
+ (if (fboundp 'make-temp-file)
+ 'make-temp-file
+ (lambda (prefix &optional dir-flag)
+ (let ((file (expand-file-name
+ (make-temp-name prefix)
+ (if (fboundp 'temp-directory)
+ (temp-directory)
+ temporary-file-directory))))
+ (if dir-flag
+ (make-directory file))
+ file))))
+
(provide 'mm-util)
;;; mm-util.el ends here