From xemacs-m  Wed Mar  5 09:55:06 1997
Received: from mikan.jaist.ac.jp (mikan.jaist.ac.jp [150.65.8.6])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id JAA27995
	for <xemacs-beta@xemacs.org>; Wed, 5 Mar 1997 09:55:04 -0600 (CST)
Received: from is18e0s01.jaist.ac.jp (MORIOKA Tomohiko <morioka@jaist.ac.jp>) by mikan.jaist.ac.jp (8.7.5); id AAA07633; Thu, 6 Mar 1997 00:54:34 +0900 (JST)
Message-Id: <199703051554.AAA07633@mikan.jaist.ac.jp>
X-MUA: mh-e 5.0.2 + emh 0.7, SEMI MIME-View 0.21
X-Face: %yc?f+O/cVKlH*K(H2X/6-d''suf|"1{S:Y0}_9$t@0G3:5M2:-Ck^[8+4^iSLeGc[Ey[WP
 PF]2M#Q9C'u~[=7TJP72J`PZdWvP=s-'-/LhFneC->=ILc~H#$lf2%hLL5U8?psIp`<[>d&@$Pm%~(
 A'"CJ.zuX@TXh\Ra4,b7M&`f"hexU-a4,#X\]Bfp'JI+MGUDRA%_$&UnWAem4}1R"4%uivgn;xFZ%"
 NS>)eCuFYNHc/:W^:{7H>bGQS],x5z[Cy~C;7j#:8y9q|"~9~UWjE<Vm_;)o<Q4S5NweLc(cl7-suY
 NF|_O*xodbmQavM
From: =?ISO-2022-JP?B?GyRCPGkyLBsoQiAbJEJDTkknGyhC?= / MORIOKA Tomohiko <morioka@jaist.ac.jp>
To: Martin Buchholz <mrb@Eng.Sun.COM>, Steven L Baur <steve@miranova.com>
cc: xemacs-beta@xemacs.org
Subject: A patch to sync with Emacs/mule
In-reply-to: Your message of "Wed, 26 Feb 1997 15:27:23 PST."
             <199702262327.PAA26485@xemacs.eng.sun.com> 
X-Emacs: Emacs 19.34.91, MULE 3.0 =?ISO-2022-JP?B?KBskQjlITVUybBsoQik=?=
Mime-Version: 1.0 (generated by SEMI MIME-Edit 0.60)
Content-Type: multipart/signed; protocol="application/pgp-signature";
 boundary="pgp-sign-Multipart_Thu_Mar__6_00:54:20_1997-1"; micalg=pgp-md5
Content-Transfer-Encoding: 7bit
Date: Thu, 06 Mar 1997 00:54:37 JST
Sender: morioka@jaist.ac.jp

--pgp-sign-Multipart_Thu_Mar__6_00:54:20_1997-1
Content-Type: multipart/mixed;
 boundary="Multipart_Thu_Mar__6_00:54:20_1997-1"
Content-Transfer-Encoding: 7bit

--Multipart_Thu_Mar__6_00:54:20_1997-1
Content-Type: text/plain; charset=US-ASCII

>>>>> In <199702262327.PAA26485@xemacs.eng.sun.com> 
>>>>>	"Martin" = Martin Buchholz <mrb@Eng.Sun.COM> wrote:

Martin> >>>>> "MT" == Tomohiko Morioka <tmorioka@mule.etl.go.jp> writes:

MT>   By the way, according HANDA Ken'ichi, Mule feature was merged to
MT> Emacs source tree in FSF, so next version of FSF Emacs will include
MT> mule feature.  So I would like to modify XEmacs/mule to sync with
MT> Emacs/mule about some rest differences.  In particular:

MT> 	overriding-file-coding-system -> coding-system-for-read
MT> 	Add coding-system-for-write

MT> Do you think about it?  Should I wait until XEmacs 20.2?

Martin> I agree that we should strive for lisp-level compatibility.  Any
Martin> patches from you to achieve this are welcome.

  Following is a patch for XEmacs 20.1-b5:


--Multipart_Thu_Mar__6_00:54:20_1997-1
Content-Type: application/octet-stream; type=patch
Content-Disposition: attachment; filename="xemacs-20.1-b5.diff"
Content-Transfer-Encoding: 7bit

diff -ru xemacs-20.1-b5/lisp/mule/mule-files.el xemacs-20.1-b5+/lisp/mule/mule-files.el
--- xemacs-20.1-b5/lisp/mule/mule-files.el	Thu Jan 30 11:22:37 1997
+++ xemacs-20.1-b5+/lisp/mule/mule-files.el	Wed Mar  5 01:07:04 1997
@@ -33,7 +33,15 @@
 (setq-default file-coding-system 'iso-2022-8)
 (put 'file-coding-system 'permanent-local t)
 
-(defvar overriding-file-coding-system nil
+(defvar coding-system-for-write nil
+  "Overriding coding system used when writing a file.
+You should *bind* this, not set it.  If this is non-nil, it specifies
+the coding system that will be used when a file is wrote in, and
+overrides `file-coding-system', `insert-file-contents-pre-hook',
+etc.  Use those variables instead of this one for permanent changes
+to the environment.")
+
+(defvar coding-system-for-read nil
   "Overriding coding system used when reading a file.
 You should *bind* this, not set it.  If this is non-nil, it specifies
 the coding system that will be used when a file is read in, and
@@ -47,7 +55,7 @@
 use `file-coding-system-alist'.  From a Lisp program, if you wish
 to unilaterally specify the coding system used for one
 particular operation, you should bind the variable
-`overriding-file-coding-system' rather than setting this variable,
+`coding-system-for-read' rather than setting this variable,
 which is intended to be used for global environment specification.")
 
 (defvar file-coding-system-alist
@@ -62,7 +70,7 @@
 Each element of the alist is a cons of a regexp, specifying the files
 to be affected, and a coding system.  This overrides the more
 general specification in `file-coding-system-for-read', but is
-overridden by `overriding-file-coding-system'.
+overridden by `coding-system-for-read'.
 
 Instead of a coding system you may specify a function, and it will be
 called after the file has been read in to decode the file.  It is
@@ -279,7 +287,7 @@
 
 The coding system used for decoding the file is determined as follows:
 
-1. `overriding-file-coding-system', if non-nil.
+1. `coding-system-for-read', if non-nil.
 2. The result of `insert-file-contents-pre-hook', if non-nil.
 3. The matching value for this filename from `file-coding-system-alist',
    if any.
@@ -302,7 +310,7 @@
 	  (setq coding-system
 		(or
 		 ;; #1.
-		 overriding-file-coding-system
+		 coding-system-for-read
 		 ;; #2.
 		 (run-special-hook-with-args 'insert-file-contents-pre-hook
 					     filename visit)
@@ -431,7 +439,8 @@
 See also `write-region-pre-hook' and `write-region-post-hook'."
   (interactive "r\nFWrite region to file: \ni\ni\ni\nZCoding-system: ")
   (setq coding-system
-	(or (run-special-hook-with-args
+	(or coding-system-for-write
+	    (run-special-hook-with-args
 	     'write-region-pre-hook start end filename append visit lockname)
 	    coding-system
 	    file-coding-system))
Only in xemacs-20.1-b5+/lisp/mule: mule-files.el~
diff -ru xemacs-20.1-b5/lisp/prim/files.el xemacs-20.1-b5+/lisp/prim/files.el
--- xemacs-20.1-b5/lisp/prim/files.el	Thu Feb 27 15:08:19 1997
+++ xemacs-20.1-b5+/lisp/prim/files.el	Wed Mar  5 00:15:24 1997
@@ -32,7 +32,7 @@
 ;;; Code:
 
 ;; XEmacs: Avoid compilation warnings.
-(defvar overriding-file-coding-system)
+(defvar coding-system-for-read)
 (defvar file-coding-system)
 
 ;; XEmacs: In buffer.c
@@ -590,7 +590,7 @@
 with a prefix argument, you will be prompted for the coding system."
   (interactive "FFind file: \nZCoding system: ")
   (if codesys
-      (let ((overriding-file-coding-system
+      (let ((coding-system-for-read
 	     (get-coding-system codesys)))
 	(switch-to-buffer (find-file-noselect filename)))
     (switch-to-buffer (find-file-noselect filename))))
@@ -604,7 +604,7 @@
 with a prefix argument, you will be prompted for the coding system."
   (interactive "FFind file in other window: \nZCoding system: ")
   (if codesys
-      (let ((overriding-file-coding-system
+      (let ((coding-system-for-read
v 	     (get-coding-system codesys)))
 	(switch-to-buffer-other-window (find-file-noselect filename)))
     (switch-to-buffer-other-window (find-file-noselect filename))))
@@ -616,7 +616,7 @@
 with a prefix argument, you will be prompted for the coding system."
   (interactive "FFind file in other frame: \nZCoding system: ")
   (if codesys
-      (let ((overriding-file-coding-system
+      (let ((coding-system-for-read
 	     (get-coding-system codesys)))
 	(switch-to-buffer-other-frame (find-file-noselect filename)))
     (switch-to-buffer-other-frame (find-file-noselect filename))))
@@ -630,7 +630,7 @@
 with a prefix argument, you will be prompted for the coding system."
   (interactive "fFind file read-only: \nZCoding system: ")
   (if codesys
-      (let ((overriding-file-coding-system
+      (let ((coding-system-for-read
 	     (get-coding-system codesys)))
 	(find-file filename))
     (find-file filename))
@@ -646,7 +646,7 @@
 with a prefix argument, you will be prompted for the coding system."
   (interactive "fFind file read-only other window: \nZCoding system: ")
   (if codesys
-      (let ((overriding-file-coding-system
+      (let ((coding-system-for-read
 	     (get-coding-system codesys)))
 	(find-file-other-window filename))
     (find-file-other-window filename))
@@ -662,7 +662,7 @@
 with a prefix argument, you will be prompted for the coding system."
   (interactive "fFind file read-only other frame: \nZCoding system: ")
   (if codesys
-      (let ((overriding-file-coding-system
+      (let ((coding-system-for-read
 	     (get-coding-system codesys)))
 	(find-file-other-frame filename))
     (find-file-other-frame filename))
@@ -733,7 +733,7 @@
 	(progn
 	  (unlock-buffer)
 	  (if codesys
-	      (let ((overriding-file-coding-system
+	      (let ((coding-system-for-read
 		     (get-coding-system codesys)))
 		(find-file filename))
 	    (find-file filename)))
@@ -2305,7 +2305,7 @@
 				filename)))
   (let ((tem
 	 (if codesys
-	     (let ((overriding-file-coding-system
+	     (let ((coding-system-for-read
 		    (get-coding-system codesys)))
 	       (insert-file-contents filename))
 	   (insert-file-contents filename))))
Only in xemacs-20.1-b5+/lisp/prim: files.el~
diff -ru xemacs-20.1-b5/lisp/vm/vm-folder.el xemacs-20.1-b5+/lisp/vm/vm-folder.el
--- xemacs-20.1-b5/lisp/vm/vm-folder.el	Thu Feb 27 15:08:23 1997
+++ xemacs-20.1-b5+/lisp/vm/vm-folder.el	Wed Mar  5 00:16:08 1997
@@ -508,7 +508,7 @@
 		  (set-buffer temp-buffer)
 		  (if (file-readable-p file)
 		      (condition-case nil
-			  (let ((overriding-file-coding-system 'binary))
+			  (let ((coding-system-for-read 'binary))
 			    (insert-file-contents file nil 0 4096))
 			(wrong-number-of-arguments
 			 (call-process "sed" file temp-buffer nil
@@ -2538,7 +2538,7 @@
 	     ;; enable-local-variables == nil disables them for newer Emacses
 	     (let ((inhibit-local-variables t)
 		   (enable-local-variables nil)
-		   (overriding-file-coding-system 'no-conversion))
+		   (coding-system-for-read 'no-conversion))
 	       (find-file-noselect crash-box)))
        (save-excursion
 	 (set-buffer crash-buf)
@@ -2839,7 +2839,7 @@
 	     (vm-save-restriction
 	      (widen)
 	      (goto-char (point-max))
-	      (let ((overriding-file-coding-system 'binary))
+	      (let ((coding-system-for-read 'binary))
 		(insert-file-contents folder))))
 	   (setq mcount (length vm-message-list))
 	   (if (vm-assimilate-new-messages)
Only in xemacs-20.1-b5+/lisp/vm: vm-folder.el~
diff -ru xemacs-20.1-b5/lisp/vm/vm-startup.el xemacs-20.1-b5+/lisp/vm/vm-startup.el
--- xemacs-20.1-b5/lisp/vm/vm-startup.el	Thu Feb 27 15:08:26 1997
+++ xemacs-20.1-b5+/lisp/vm/vm-startup.el	Wed Mar  5 00:16:46 1997
@@ -63,7 +63,7 @@
 			    (inhibit-local-variables t)
 			    (enable-local-variables nil)
 			    ;; for XEmacs/Mule
-			    (overriding-file-coding-system 'no-conversion))
+			    (coding-system-for-read 'no-conversion))
 			(message "Reading %s..." file)
 			(prog1 (find-file-noselect file)
 			  ;; update folder history
Only in xemacs-20.1-b5+/lisp/vm: vm-startup.el~
diff -ru xemacs-20.1-b5/src/buffer.c xemacs-20.1-b5+/src/buffer.c
--- xemacs-20.1-b5/src/buffer.c	Mon Feb 24 10:14:45 1997
+++ xemacs-20.1-b5+/src/buffer.c	Wed Mar  5 00:17:33 1997
@@ -2511,7 +2511,7 @@
 and `file-coding-system-alist' for that.  From a Lisp program, if
 you wish to unilaterally specify the coding system used for one
 particular operation, you should bind the variable
-`overriding-file-coding-system' rather than changing the other two
+`coding-system-for-read' rather than changing the other two
 variables just mentioned, which are intended to be used for
 global environment specification.
 */ );
Only in xemacs-20.1-b5+/src: buffer.c~

--Multipart_Thu_Mar__6_00:54:20_1997-1
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

-- 
----------------------------------------------------------------------
MORIOKA Tomohiko <morioka@jaist.ac.jp>
        Japan advanced Institute of Science and Technology, Hokuriku
                Asahi-dai, Tatsu-no-kuchi ch=F4, Nomi, Ishikawa, Japan
------------------------------------------ Frisch, Frei, Fr=F6hlich! ---

--Multipart_Thu_Mar__6_00:54:20_1997-1--

--pgp-sign-Multipart_Thu_Mar__6_00:54:20_1997-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit

-----BEGIN PGP MESSAGE-----
Version: 2.6.3ia
Comment: Processed by Mailcrypt 3.4, an Emacs/PGP interface

iQCVAwUBMx2XNxnuUGV7wuH5AQGfvAQAmGozBOh5PMVLLciInDO7Q0GV+uUMf4Ya
0eblkmGIFn408o8r2Dkx7zckFnwoM1AaEDQcBNFQQz2PlmgKWmTad+dNLjk8ARa0
1zR3sx46bARR20LMXt+lMgcbqwgoqshm3riNzfwufohp0D3RF8b/bcePGgr6EB/8
8Ob9YyYra/o=
=/Ww8
-----END PGP MESSAGE-----

--pgp-sign-Multipart_Thu_Mar__6_00:54:20_1997-1--

