diff lisp/ediff-util.el @ 82467:ff85cbd27ee2

2007-08-19 Michael Kifer <kifer@cs.stonybrook.edu> * viper.el (viper-remove-hooks): remove some additional viper hooks when the user calls viper-go-away. (viper-go-away): restore the default of default-major-mode. Save the value of default-major-mode before vaperization. * viper-cmd.el: Replace error "" with "Viper bell". * viper-ex.el: Replace error "" with "Viper bell". * ediff-util.el (ediff-make-temp-file): use the coding system of the buffer for which file is created.
author Michael Kifer <kifer@cs.stonybrook.edu>
date Sun, 19 Aug 2007 13:47:08 +0000
parents b98604865ea0
children cac94194ce6d aaccdab0ee26
line wrap: on
line diff
--- a/lisp/ediff-util.el	Sun Aug 19 03:05:35 2007 +0000
+++ b/lisp/ediff-util.el	Sun Aug 19 13:47:08 2007 +0000
@@ -3164,7 +3164,11 @@
 (defun ediff-make-temp-file (buff &optional prefix given-file start end)
   (let* ((p (ediff-convert-standard-filename (or prefix "ediff")))
 	 (short-p p)
-	 (coding-system-for-write ediff-coding-system-for-write)
+	 (coding-system-for-write
+	  (ediff-with-current-buffer buff
+	    (if (boundp 'buffer-file-coding-system)
+		buffer-file-coding-system
+	      ediff-coding-system-for-write)))
 	 f short-f)
     (if (and (fboundp 'msdos-long-file-names)
 	     (not (msdos-long-file-names))