Source

vm / vm-save.el

Diff from to

File vm-save.el

 			;; match data.
 			(save-excursion
 			  (set-buffer buf)
+			  (if vm-fsfemacs-mule-p
+			      (set-buffer-multibyte nil))
 			  (widen)
 			  (erase-buffer)
 			  (insert header)
 	      ((equal prefix-arg '(64))
 	       (narrow-to-region (vm-vheaders-of m) (vm-text-end-of m)))
 	      (t (narrow-to-region (point) (vm-text-end-of m))))
-	(let ((pop-up-windows (and pop-up-windows (eq vm-mutable-windows t))))
+	(let ((pop-up-windows (and pop-up-windows (eq vm-mutable-windows t)))
+	      ;; call-process-region calls write-region.
+	      ;; don't let it do CR -> LF translation.
+	      (selective-display nil))
 	  (call-process-region (point-min) (point-max)
 			       (or shell-file-name "sh")
 			       nil buffer nil shell-command-switch command)))
 			(vm-mime-external-content-types-alist nil))
 		    (vm-decode-mime-layout (vm-mm-layout m)))
 		  (let ((pop-up-windows (and pop-up-windows
-					     (eq vm-mutable-windows t))))
+					     (eq vm-mutable-windows t)))
+			;; call-process-region calls write-region.
+			;; don't let it do CR -> LF translation.
+			(selective-display nil))
 		    (if need-tempfile
 			(write-region (point-min) (point-max)
 				      tempfile nil 0))
 	  (widen)
 	  (narrow-to-region (vm-vheaders-of m) (vm-text-end-of m))
 	  (let ((pop-up-windows (and pop-up-windows
-				     (eq vm-mutable-windows t))))
+				     (eq vm-mutable-windows t)))
+		;; call-process-region calls write-region.
+		;; don't let it do CR -> LF translation.
+		(selective-display nil))
 	    (if need-tempfile
 		(write-region (point-min) (point-max)
 			      tempfile nil 0))