From: yamaoka Date: Thu, 28 Dec 2000 01:38:11 +0000 (+0000) Subject: Synch with `flim-1_14'. X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02e24369cafb72b07e4daec089491bab50e8dff1;p=elisp%2Fflim.git Synch with `flim-1_14'. * mel.el (binary-to-text-funcall, binary-funcall): Rewrite using `static-cond'. --- diff --git a/ChangeLog b/ChangeLog index af8ce5e..b1a3e67 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2000-12-28 Katsumi Yamaoka + + * mel.el (binary-to-text-funcall, binary-funcall): Rewrite using + `static-cond'. + +2000-12-27 MORIOKA Tomohiko + + * mime-conf.el (mime-mailcap-file): Turn to non user option. + 2000-12-26 Katsumi Yamaoka * mel.el (binary-to-text-funcall): Bind diff --git a/mel.el b/mel.el index 5ef5819..3d10b13 100644 --- a/mel.el +++ b/mel.el @@ -25,6 +25,7 @@ ;;; Code: +(eval-when-compile (require 'static)) (require 'mime-def) (require 'poem) (require 'alist) @@ -114,29 +115,64 @@ Content-Transfer-Encoding for it." (defun binary-funcall (name &rest args) "Like `funcall', q.v., but read and write as binary." - (let ((coding-system-for-read 'binary) - (coding-system-for-write 'binary) - selective-display - (default-process-coding-system '(binary . binary)) - (input-coding-system 'binary) - (output-coding-system 'binary) - default-mc-flag mc-flag - program-coding-system-alist - (default-kanji-process-code 0) - default-kanji-flag kanji-flag program-kanji-code-alist) - (apply name args))) + (static-cond + ((boundp 'NEMACS) + (let (kanji-flag + default-kanji-flag selective-display + ;; file input. + (kanji-expected-code 0) + (find-kanji-file-input-code 'find-kanji-file-input-code) + ;; file output. + (default-kanji-fileio-code 0) + (kanji-fileio-code 0) + (find-kanji-file-output-code (function (lambda (&rest args) 0))) + ;; process I/O. + (default-kanji-process-code 0) + (find-kanji-process-code 'find-kanji-process-code) + program-kanji-code-alist service-kanji-code-alist) + (apply name args))) + ((boundp 'MULE) + (let ((default-process-coding-system '(binary . binary)) + (input-coding-system 'binary) + (output-coding-system 'binary) + default-mc-flag mc-flag selective-display + call-process-hook open-network-stream-hook start-process-hook) + (apply name args))) + (t + (let ((coding-system-for-read 'binary) + (coding-system-for-write 'binary)) + (apply name args))))) (defun binary-to-text-funcall (coding-system name &rest args) "Like `funcall', q.v., but write as binary and read as text. -Read text is decoded as CODING-SYSTEM. It won't work with Nemacs." - (let ((coding-system-for-read coding-system) - (coding-system-for-write 'binary) - selective-display - (default-process-coding-system (cons coding-system 'binary)) - (input-coding-system coding-system) - (output-coding-system 'binary) - program-coding-system-alist) - (apply name args))) +Read text is decoded as CODING-SYSTEM. +It won't work for processes in Nemacs." + (static-cond + ((boundp 'NEMACS) + (let (selective-display + ;; file input. + (kanji-expected-code coding-system) + (find-kanji-file-input-code 'find-kanji-file-input-code) + ;; file output. + (default-kanji-fileio-code 0) + (kanji-fileio-code 0) + (find-kanji-file-output-code (function (lambda (&rest args) 0))) + ;; process I/O (use `coding-system' for both input and output). + (default-kanji-process-code coding-system) + (find-kanji-process-code 'find-kanji-process-code) + program-kanji-code-alist service-kanji-code-alist) + (apply name args))) + ((boundp 'MULE) + (let ((default-process-coding-system (cons coding-system 'binary)) + (input-coding-system coding-system) + (output-coding-system 'binary) + selective-display + call-process-hook open-network-stream-hook start-process-hook) + (apply name args))) + (t + (let ((coding-system-for-read coding-system) + (coding-system-for-write 'binary)) + (apply name args))))) (mel-define-backend "binary") (mel-define-method-function (mime-encode-string string (nil "binary")) diff --git a/mime-conf.el b/mime-conf.el index 84fed40..0550893 100644 --- a/mime-conf.el +++ b/mime-conf.el @@ -176,10 +176,8 @@ order. Otherwise result is not sorted." ;;;###autoload -(defcustom mime-mailcap-file "~/.mailcap" - "*File name of user's mailcap file." - :group 'mime - :type 'file) +(defvar mime-mailcap-file "~/.mailcap" + "*File name of user's mailcap file.") ;;;###autoload (defun mime-parse-mailcap-file (&optional filename order) diff --git a/smtp.el b/smtp.el index 9c82cb0..cc695a9 100644 --- a/smtp.el +++ b/smtp.el @@ -237,7 +237,7 @@ BUFFER is the buffer to associate with the connection. SERVER is name of the host to connect to. SERVICE is name of the service desired." (let* ((process (binary-funcall smtp-open-connection-function - "SMTP" buffer server service)) + "SMTP" buffer server service)) connection) (when process (setq connection (smtp-make-connection process server service)) diff --git a/smtpmail.el b/smtpmail.el index de0f593..1754fdc 100644 --- a/smtpmail.el +++ b/smtpmail.el @@ -1,6 +1,6 @@ ;;; smtpmail.el --- SMTP interface for mail-mode -;; Copyright (C) 1995, 1996, 1998, 1999 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1996, 1998, 1999, 2000 Free Software Foundation, Inc. ;; Author: Tomoji Kagatani ;; Keywords: mail @@ -47,7 +47,7 @@ (require 'smtp) (require 'sendmail) (require 'time-stamp) -(require 'mel) +(require 'mel) ; binary-write-decoded-region, binary-find-file-noselect (eval-when-compile (require 'static))