Mercurial > emacs
diff lisp/mail/feedmail.el @ 104662:790bd85e4cb0
* mail/feedmail.el: Use CL macros.
(feedmail-run-the-queue, feedmail-send-it-immediately):
* dos-w32.el (find-buffer-file-type): Replace uses of
default-buffer-file-type with (default-value 'buffer-file-type).
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Fri, 28 Aug 2009 04:05:58 +0000 |
parents | c3512b2085a0 |
children | 21469025a673 |
line wrap: on
line diff
--- a/lisp/mail/feedmail.el Fri Aug 28 03:18:49 2009 +0000 +++ b/lisp/mail/feedmail.el Fri Aug 28 04:05:58 2009 +0000 @@ -286,7 +286,7 @@ (defconst feedmail-patch-level "8") -(eval-when-compile (require 'smtpmail)) +(eval-when-compile (require 'smtpmail) (require 'cl)) (autoload 'mail-do-fcc "sendmail") (defgroup feedmail nil @@ -481,11 +481,10 @@ (defcustom feedmail-force-binary-write t "*If non-nil, force writing file as binary (this applies to queues and Fcc:). On systems where there is a difference between binary and text files, -feedmail will temporarily manipulate the values of `buffer-file-type' -and/or `default-buffer-file-type' to make the writing as binary. If -nil, writing will be in text mode. On systems where there is no -distinction or where it is controlled by other variables or other -means, this option has no effect." +feedmail will temporarily manipulate the value of `buffer-file-type' +to make the writing as binary. If nil, writing will be in text mode. +On systems where there is no distinction or where it is controlled by other +variables or other means, this option has no effect." :group 'feedmail-misc :type 'boolean ) @@ -1601,9 +1600,9 @@ (not (let ((mail-header-separator feedmail-queue-alternative-mail-header-separator)) (feedmail-find-eoh t))))) - (let ((file-name-buffer-file-type-alist nil) (default-buffer-file-type nil)) - (erase-buffer) (insert-file-contents maybe-file)) - ) + (letf ((file-name-buffer-file-type-alist nil) + ((default-value 'buffer-file-type) nil)) + (erase-buffer) (insert-file-contents maybe-file))) ;; if M-H-S not found and (a-M-H-S is non-nil and is found) ;; temporarily set M-H-S to the value of a-M-H-S (if (and (not (feedmail-find-eoh t)) @@ -1913,7 +1912,8 @@ (setq filename buffer-file-name) (setq filename (feedmail-create-queue-filename queue-directory))) ;; make binary file on DOS/Win95/WinNT, etc - (let ((buffer-file-type feedmail-force-binary-write)) (write-file filename)) + (let ((buffer-file-type feedmail-force-binary-write)) + (write-file filename)) ;; convenient for moving from draft to q, for example (if (and previous-buffer-file-name (or (not is-fqm) (not is-in-this-dir)) (y-or-n-p (format "FQM: Was previously %s; delete that? " previous-buffer-file-name))) @@ -2086,7 +2086,8 @@ ))) (goto-char (point-min)) ;; re-insert and handle any Fcc fields (and, optionally, any Bcc). - (if fcc (let ((default-buffer-file-type feedmail-force-binary-write)) + (if fcc (letf (((default-value 'buffer-file-type) + feedmail-force-binary-write)) (insert fcc) (if (not feedmail-nuke-bcc-in-fcc) (progn (if bcc-holder (insert bcc-holder))