comparison lisp/vm/vm-pop.el @ 98:0d2f883870bc r20-1b1

Import from CVS: tag r20-1b1
author cvs
date Mon, 13 Aug 2007 09:13:56 +0200
parents 131b0175ea99
children 4be1180a9e89
comparison
equal deleted inserted replaced
97:498bf5da1c90 98:0d2f883870bc
233 ;; for the Content-Length stuff counting from eob is 233 ;; for the Content-Length stuff counting from eob is
234 ;; the same thing in this case. 234 ;; the same thing in this case.
235 (vm-convert-folder-type-headers nil vm-folder-type) 235 (vm-convert-folder-type-headers nil vm-folder-type)
236 (goto-char end) 236 (goto-char end)
237 (insert-before-markers (vm-trailing-message-separator)))) 237 (insert-before-markers (vm-trailing-message-separator))))
238 (write-region start end crash t 0) 238 ;; Set file type to binary for DOS/Windows. I don't know if
239 ;; this is correct to do or not; it depends on whether the
240 ;; the CRLF or the LF newline convention is used on the inbox
241 ;; associated with this crashbox. This setting assumes the LF
242 ;; newline convention is used.
243 (let ((buffer-file-type t))
244 (write-region start end crash t 0))
239 (delete-region start end) 245 (delete-region start end)
240 t )) 246 t ))
241 247
242 (defun vm-pop-cleanup-region (start end) 248 (defun vm-pop-cleanup-region (start end)
243 (setq end (vm-marker end)) 249 (setq end (vm-marker end))
260 (setq buffer (generate-new-buffer "*vm-work*")) 266 (setq buffer (generate-new-buffer "*vm-work*"))
261 (set-buffer buffer) 267 (set-buffer buffer)
262 (insert string) 268 (insert string)
263 (call-process-region (point-min) (point-max) 269 (call-process-region (point-min) (point-max)
264 "/bin/sh" t buffer nil 270 "/bin/sh" t buffer nil
265 "-c" vm-pop-md5-program) 271 shell-command-switch vm-pop-md5-program)
266 ;; MD5 digest is 32 chars long 272 ;; MD5 digest is 32 chars long
267 ;; mddriver adds a newline to make neaten output for tty 273 ;; mddriver adds a newline to make neaten output for tty
268 ;; viewing, make sure we leave it behind. 274 ;; viewing, make sure we leave it behind.
269 (vm-buffer-substring-no-properties (point-min) (+ (point-min) 32))) 275 (vm-buffer-substring-no-properties (point-min) (+ (point-min) 32)))
270 (and buffer (kill-buffer buffer))))) 276 (and buffer (kill-buffer buffer)))))