;;; sendmail.el --- mail sending commands for Emacs. -*- byte-compile-dynamic: t -*-
;; Copyright (C) 1985, 1986, 1992, 1993, 1994, 1995, 1996, 1998, 2000,
-;; 2001, 2002, 2003, 2004, 2005, 2006, 2007 Free Software Foundation, Inc.
+;; 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
;; Maintainer: FSF
;; Keywords: mail
;; GNU Emacs is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
;; any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
"Bury this mail buffer."
(let ((newbuf (other-buffer (current-buffer))))
(bury-buffer (current-buffer))
- (if (and (or (window-dedicated-p (frame-selected-window))
+ (if (and (or nil
+ ;; In this case, we need to go to a different frame.
+ (window-dedicated-p (frame-selected-window))
+ ;; In this mode of operation, the frame was probably
+ ;; made for this buffer, so the user probably wants
+ ;; to delete it now.
+ (and pop-up-frames (one-window-p))
(cdr (assq 'mail-dedicated-frame (frame-parameters))))
(not (null (delq (selected-frame) (visible-frame-list)))))
(progn
nil)
(t (error "Invalid value for `mail-from-style'")))))
+;; Normally you will not need to modify these options unless you are
+;; using some non-genuine substitute for sendmail which does not
+;; implement each and every option that the original supports.
+;; E.g., ssmtp does not support "-odb", so, if your site uses it,
+;; you will need to modify `sendmail-error-reporting-non-interactive'
+;; in your site-init.el.
+(defvar sendmail-error-reporting-interactive
+ ;; These mean "report errors to terminal" and "deliver interactively"
+ '("-oep" "-odi"))
+(defvar sendmail-error-reporting-non-interactive
+ ;; These mean "report errors by mail" and "deliver in background".
+ '("-oem" "-odb"))
+
(defun sendmail-send-it ()
"Send the current mail buffer using the Sendmail package.
This is a suitable value for `send-mail-function'. It sends using the
(and mail-alias-file
(list (concat "-oA" mail-alias-file)))
(if mail-interactive
- ;; These mean "report errors to terminal"
- ;; and "deliver interactively"
- '("-oep" "-odi")
- ;; These mean "report errors by mail"
- ;; and "deliver in background".
- '("-oem" "-odb"))
+ sendmail-error-reporting-interactive
+ sendmail-error-reporting-non-interactive)
;; Get the addresses from the message
;; unless this is a resend.
;; We must not do that for a resend
(message "Auto save file for draft message exists; consider M-x mail-recover"))
initialized))
+(declare-function dired-view-file "dired" ())
+(declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep))
+
(defun mail-recover-1 ()
"Pop up a list of auto-saved draft messages so you can recover one of them."
(interactive)
(setq buffer-file-coding-system
default-buffer-file-coding-system))))))))
+(declare-function dired-move-to-filename "dired" (&optional raise-error eol))
+(declare-function dired-get-filename "dired" (&optional localp no-error-if-not-filep))
+(declare-function dired-view-file "dired" ())
+
(defun mail-recover ()
"Recover interrupted mail composition from auto-save files.