(defcustom mail-setup-with-from t
"Non-nil means insert `From:' field when setting up the message."
:type 'boolean
- :group 'sendmail
:version "22.1")
(defcustom sendmail-program
(t "sendmail")))
"Program used to send messages."
:version "24.1" ; add executable-find, remove fakemail
- :group 'mail
:type 'file)
;;;###autoload
(const parens)
(const angles)
(const default))
- :version "27.1"
- :group 'sendmail)
+ :version "27.1")
(make-obsolete-variable
'mail-from-style
"only the `angles' value is valid according to RFC2822." "27.1" 'set)
smtpmail -- if you use feedmail to send mail, see instead the
variable `feedmail-deduce-envelope-from'."
:version "21.1"
- :type 'boolean
- :group 'sendmail)
+ :type 'boolean)
(defcustom mail-envelope-from nil
"If non-nil, designate the envelope-from address when sending mail.
:version "21.1"
:type '(choice (string :tag "From-name")
(const :tag "Use From: header from message" header)
- (const :tag "Use `user-mail-address'" nil))
- :group 'sendmail)
+ (const :tag "Use `user-mail-address'" nil)))
;;;###autoload
(defcustom mail-self-blind nil
"Non-nil means insert Bcc to self in messages to be sent.
This is done when the message is initialized,
so you can remove or alter the Bcc field to override the default."
- :type 'boolean
- :group 'sendmail)
+ :type 'boolean)
;;;###autoload
(defcustom mail-interactive t
"Non-nil means when sending a message wait for and display errors.
Otherwise, let mailer send back a message to report errors."
:type 'boolean
- :version "23.1" ; changed from nil to t
- :group 'sendmail)
+ :version "23.1") ; changed from nil to t
(defcustom mail-yank-ignored-headers
(concat "^"
":")
"Delete these headers from old message when it's inserted in a reply."
:type 'regexp
- :group 'sendmail
:version "23.1")
;; Useful to set in site-init.el
;; Assume smtpmail is the preferred choice if it's already configured.
(if (and (boundp 'smtpmail-smtp-server)
smtpmail-smtp-server)
- 'smtpmail-send-it 'sendmail-query-once)
+ #'smtpmail-send-it #'sendmail-query-once)
"Function to call to send the current buffer as mail.
The headers should be delimited by a line which is
not a valid RFC 822 (or later) header or continuation line,
(function-item feedmail-send-it :tag "Use Feedmail package")
(function-item mailclient-send-it :tag "Use Mailclient package")
function)
- :version "24.1"
- :group 'sendmail)
+ :version "24.1")
;;;###autoload
(defcustom mail-header-separator (purecopy "--text follows this line--")
"Line used to separate headers from text in messages being composed."
- :type 'string
- :group 'sendmail)
+ :type 'string)
;; Set up mail-header-separator for use as a category text property.
(put 'mail-header-separator 'rear-nonsticky '(category))
"Name of file to write all outgoing messages in, or nil for none.
This is normally an mbox file, but for backwards compatibility may also
be a Babyl file."
- :type '(choice file (const nil))
- :group 'sendmail)
+ :type '(choice file (const nil)))
;;;###autoload
(defcustom mail-default-reply-to nil
"Address to insert as default Reply-To field of outgoing messages.
If nil, it will be initialized from the REPLYTO environment variable
when you first send mail."
- :type '(choice (const nil) string)
- :group 'sendmail)
+ :type '(choice (const nil) string))
(defcustom mail-alias-file nil
"If non-nil, the name of a file to use instead of the sendmail default.
This variable has no effect unless your system uses sendmail as its mailer.
The default file is defined in sendmail's configuration file, e.g.
`/etc/aliases'."
- :type '(choice (const :tag "Sendmail default" nil) file)
- :group 'sendmail)
+ :type '(choice (const :tag "Sendmail default" nil) file))
;;;###autoload
(defcustom mail-personal-alias-file (purecopy "~/.mailrc")
This file typically should be in same format as the `.mailrc' file used by
the `Mail' or `mailx' program.
This file need not actually exist."
- :type '(choice (const nil) file)
- :group 'sendmail)
+ :type '(choice (const nil) file))
;;;###autoload
(defcustom mail-setup-hook nil
"Normal hook, run each time a new outgoing message is initialized."
:type 'hook
- :options '(fortune-to-signature spook mail-abbrevs-setup)
- :group 'sendmail)
+ :options '(fortune-to-signature spook mail-abbrevs-setup))
;;;###autoload
(defvar mail-aliases t
(defcustom mail-yank-prefix "> "
"Prefix insert on lines of yanked message being replied to.
If this is nil, use indentation, as specified by `mail-indentation-spaces'."
- :type '(choice (const nil) string)
- :group 'sendmail)
+ :type '(choice (const nil) string))
;;;###autoload
(defcustom mail-indentation-spaces 3
"Number of spaces to insert at the beginning of each cited line.
Used by `mail-yank-original' via `mail-indent-citation'."
- :type 'integer
- :group 'sendmail)
+ :type 'integer)
;;;###autoload
(defcustom mail-citation-hook nil
If this hook is entirely empty (nil), a default action is taken
instead of no action."
- :type 'hook
- :group 'sendmail)
+ :type 'hook)
(defvar mail-citation-header nil
"While running `mail-citation-hook', this variable holds the message header.
with whitespace before and after; it should also match just whitespace.
The default value matches citations like `foo-bar>' plus whitespace."
:type 'regexp
- :group 'sendmail
:version "24.1")
(defvar mail-abbrevs-loaded nil)
:type '(choice (const :tag "None" nil)
(const :tag "Use `.signature' file" t)
(string :tag "String to insert")
- (sexp :tag "Expression to evaluate"))
- :group 'sendmail)
+ (sexp :tag "Expression to evaluate")))
(put 'mail-signature 'risky-local-variable t)
;;;###autoload
(defcustom mail-signature-file (purecopy "~/.signature")
"File containing the text inserted at end of mail buffer."
- :type 'file
- :group 'sendmail)
+ :type 'file)
;;;###autoload
(defcustom mail-default-directory (purecopy "~/")
Note that Message mode does not use this variable; it auto-saves
in `message-auto-save-directory'."
:type '(directory :tag "Directory")
- :group 'sendmail
:version "22.1")
(defvar mail-reply-action nil)
"A string containing header lines, to be inserted in outgoing messages.
It can contain newlines, and should end in one. It is inserted
before you edit the message, so you can edit or delete the lines."
- :type '(choice (const nil) string)
- :group 'sendmail)
+ :type '(choice (const nil) string))
(defcustom mail-bury-selects-summary t
"If non-nil, try to show Rmail summary buffer after returning from mail.
The functions \\[mail-send-on-exit] or \\[mail-dont-send] select
the Rmail summary buffer before returning, if it exists and this variable
is non-nil."
- :type 'boolean
- :group 'sendmail)
+ :type 'boolean)
(defcustom mail-send-nonascii 'mime
"Specify whether to allow sending non-ASCII characters in mail.
The default is `mime'.
Including non-ASCII characters in a mail message can be problematical
for the recipient, who may not know how to decode them properly."
- :type '(choice (const t) (const nil) (const query) (const mime))
- :group 'sendmail)
+ :type '(choice (const t) (const nil) (const query) (const mime)))
(defcustom mail-use-dsn nil
"Ask MTA for notification of failed, delayed or successful delivery.
Note that only some MTAs (currently only recent versions of Sendmail)
support Delivery Status Notification."
- :group 'sendmail
:type '(repeat (radio (const :tag "Failure" failure)
(const :tag "Delay" delay)
(const :tag "Success" success)))
;; If send-mail-function is already setup, we're incorrectly called
;; a second time, probably because someone's using an old value
;; of send-mail-function.
- (if (not (eq send-mail-function 'sendmail-query-once))
+ (if (not (eq send-mail-function #'sendmail-query-once))
(funcall send-mail-function)
(let ((function (sendmail-query-user-about-smtp)))
(funcall function)
\f
;;;###autoload
(define-mail-user-agent 'sendmail-user-agent
- 'sendmail-user-agent-compose
- 'mail-send-and-exit)
+ #'sendmail-user-agent-compose
+ #'mail-send-and-exit)
;;;###autoload
(defun sendmail-user-agent-compose (&optional to subject other-headers
"Hook run by Mail mode.
When composing a mail, this runs immediately after creating, or
switching to, the `*mail*' buffer. See also `mail-setup-hook'."
- :group 'sendmail
:type 'hook
:options '(footnote-mode))
(make-local-variable 'font-lock-defaults)
(setq font-lock-defaults '(mail-font-lock-keywords t t))
(make-local-variable 'paragraph-separate)
- (make-local-variable 'normal-auto-fill-function)
- (setq normal-auto-fill-function 'mail-mode-auto-fill)
- (make-local-variable 'fill-paragraph-function)
- (setq fill-paragraph-function 'mail-mode-fill-paragraph)
+ (setq-local normal-auto-fill-function #'mail-mode-auto-fill)
+ (setq-local fill-paragraph-function #'mail-mode-fill-paragraph)
;; Allow using comment commands to add/remove quoting (this only does
;; anything if mail-yank-prefix is set to a non-nil value).
(set (make-local-variable 'comment-start) mail-yank-prefix)
(defcustom mail-send-hook nil
"Hook run just before sending a message."
:type 'hook
- :options '(flyspell-mode-off)
- :group 'sendmail)
+ :options '(flyspell-mode-off))
;;;###autoload
(defcustom mail-mailing-lists nil
"List of mailing list addresses the user is subscribed to.
The variable is used to trigger insertion of the \"Mail-Followup-To\"
header when sending a message to a mailing list."
- :type '(repeat string)
- :group 'sendmail)
+ :type '(repeat string))
(declare-function mml-to-mime "mml" ())
(push e l)))
(split-string new-header-values
",[[:space:]]+" t))
- (mapconcat 'identity l ", "))
+ (mapconcat #'identity l ", "))
"\n"))
;; Add Mail-Reply-To if none yet
(unless (mail-fetch-field "mail-reply-to")
This is a suitable value for `send-mail-function'. It sends using the
external program defined by `sendmail-program'."
(require 'mail-utils)
+ ;; FIXME: A lot of the work done here seems out-of-place (e.g. it should
+ ;; happen regardless of the method used to send, whether via SMTP of
+ ;; /usr/bin/sendmail or anything else).
(let ((errbuf (if mail-interactive
(generate-new-buffer " sendmail errors")
0))
(expand-mail-aliases (point-min) delimline))
(goto-char (point-min))
;; Ignore any blank lines in the header
+ ;; FIXME: mail-header-end should have stopped at an empty line,
+ ;; so the regexp below should never match before delimline!
(while (and (re-search-forward "\n\n\n*" delimline t)
(< (point) delimline))
(replace-match "\n"))
'("-t")
)
(if mail-use-dsn
- (list "-N" (mapconcat 'symbol-name
+ (list "-N" (mapconcat #'symbol-name
mail-use-dsn ",")))
)
)
- (exit-value (apply 'call-process-region args)))
+ (exit-value (apply #'call-process-region args)))
(cond ((or (null exit-value) (eq 0 exit-value)))
((numberp exit-value)
(setq error t)
(or (bolp) (newline))
(goto-char start))))
-(define-obsolete-function-alias 'mail-attach-file 'mail-insert-file "24.1")
+(define-obsolete-function-alias 'mail-attach-file #'mail-insert-file "24.1")
(declare-function mml-attach-file "mml"
(file &optional type description disposition))