X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fapel.git;a=blobdiff_plain;f=emu-20.el;h=a6e0e925e98add91da4d4c9d37c94c9e37fb2741;hp=aaae55c5d0eda9da63cc020f63a6639483b5ee34;hb=refs%2Fheads%2Femu-unify;hpb=56c3eaceb967b4147425d13542d7dffa20bc7ff0 diff --git a/emu-20.el b/emu-20.el index aaae55c..a6e0e92 100644 --- a/emu-20.el +++ b/emu-20.el @@ -30,6 +30,7 @@ ;;; Code: (require 'custom) +(eval-when-compile (require 'wid-edit)) ;;; @ binary access @@ -49,24 +50,6 @@ `(let ((coding-system-for-write 'binary)) ,@body)) -(defun insert-binary-file-contents-literally (filename - &optional visit beg end replace) - "Like `insert-file-contents-literally', q.v., but don't code conversion. -A buffer may be modified in several ways after reading into the buffer due -to advanced Emacs features, such as file-name-handlers, format decoding, -find-file-hooks, etc. - This function ensures that none of these modifications will take place." - (let ((coding-system-for-read 'binary)) - (insert-file-contents-literally filename visit beg end replace) - )) - -(defun insert-binary-file-contents (filename &optional visit beg end replace) - "Like `insert-file-contents', q.v., but don't code and format conversion." - (let ((coding-system-for-read 'binary) - format-alist) - (insert-file-contents filename visit beg end replace) - )) - (defun write-region-as-binary (start end filename &optional append visit lockname) "Like `write-region', q.v., but don't code conversion." @@ -88,7 +71,7 @@ This constant is defined to emulate old MULE anything older than MULE ;;; @ MIME charset ;;; -(defvar mime-charset-coding-system-alist +(defcustom mime-charset-coding-system-alist `,(let ((rest '((us-ascii . iso-8859-1) (gb2312 . cn-gb-2312) @@ -105,7 +88,9 @@ This constant is defined to emulate old MULE anything older than MULE ) dest) "Alist MIME CHARSET vs CODING-SYSTEM. -MIME CHARSET and CODING-SYSTEM must be symbol.") +MIME CHARSET and CODING-SYSTEM must be symbol." + :group 'i18n + :type '(repeat (cons symbol coding-system))) (defsubst mime-charset-to-coding-system (charset &optional lbt) "Return coding-system corresponding with CHARSET.