• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/mail/

Lines Matching +defs:default +defs:file +defs:name +defs:coding +defs:system

9 ;; This file is part of GNU Emacs.
22 ;; along with GNU Emacs; see the file COPYING. If not, write to the
53 ((file-exists-p "/usr/sbin/sendmail") "/usr/sbin/sendmail")
54 ((file-exists-p "/usr/lib/sendmail") "/usr/lib/sendmail")
55 ((file-exists-p "/usr/ucblib/sendmail") "/usr/ucblib/sendmail")
59 :type 'file)
71 If `system-default', allows the mailer to insert its default From field
74 In old versions of Emacs, the `system-default' setting also caused
79 (const system-default))
105 :type '(choice (string :tag "From-name")
114 so you can remove or alter the BCC field to override the default."
136 ;; Prevent problems with `window-system' not having the correct value
141 '((if (and window-system (memq system-type '(darwin windows-nt)))
148 (if (and window-system (memq system-type '(darwin windows-nt)))
155 This is used by the default mail-sending commands. See also
180 (defcustom mail-archive-file-name nil
181 "Name of file to write all outgoing messages in, or nil for none.
182 This can be an inbox file or an Rmail file."
183 :type '(choice file (const nil))
187 (defcustom mail-default-reply-to nil
188 "Address to insert as default Reply-to field of outgoing messages.
195 (defcustom mail-alias-file nil
196 "If non-nil, the name of a file to use instead of `/usr/lib/aliases'.
197 This file defines aliases to be expanded by the mailer; this is a different
199 This variable has no effect unless your system uses sendmail as its mailer."
200 :type '(choice (const nil) file)
204 (defcustom mail-personal-alias-file "~/.mailrc"
205 "If non-nil, the name of the user's personal mail alias file.
206 This file typically should be in same format as the `.mailrc' file used by
208 This file need not actually exist."
209 :type '(choice (const nil) file)
223 or t meaning should be initialized from your mail aliases file.
224 \(The file's name is normally `~/.mailrc', but `mail-personal-alias-file'
225 can specify a different file name.)
226 The alias definitions in the file have this form:
230 "The modification time of your mail alias file when it was last examined.")
264 If this hook is entirely empty (nil), a default action is taken
279 The default value matches citations like `foo-bar>' plus whitespace."
306 (define-key map "\C-c\C-i" 'mail-attach-file)
371 "Read mail aliases from user's personal aliases file and set `mail-aliases'."
384 If t, it means to insert the contents of the file `mail-signature-file'.
391 (const :tag "Use `.signature' file" t)
398 (defcustom mail-signature-file "~/.signature"
400 :type 'file
404 (defcustom mail-default-directory "~/"
406 Value of `default-directory' for mail buffers.
419 (defcustom mail-default-headers nil
441 The default is `mime'.
460 (if (and (string-match "sparc-sun-sunos\\(\\'\\|[^5]\\)" system-configuration)
461 (file-readable-p "/etc/sendmail.cf")
463 (insert-file-contents "/etc/sendmail.cf")
467 ;; According to RFC822, "The field-name must be composed of printable
472 "Set this non-nil if the system's mailer runs the header and body together.
489 (list '("^\\(To\\|Newsgroups\\):" . font-lock-function-name-face)
517 (when mail-personal-alias-file
518 (let ((modtime (nth 5 (file-attributes mail-personal-alias-file))))
524 (or mail-default-reply-to
525 (setq mail-default-reply-to (getenv "REPLYTO")))
530 (when mail-personal-alias-file
531 (if (file-exists-p mail-personal-alias-file)
534 (kill-local-variable 'buffer-file-coding-system)
537 (set-buffer-multibyte default-enable-multibyte-characters)
577 (if mail-default-headers
578 (insert mail-default-headers))
579 (if mail-default-reply-to
580 (insert "Reply-to: " mail-default-reply-to "\n"))
583 (if mail-archive-file-name
584 (insert "FCC: " mail-archive-file-name "\n"))
593 (if (file-exists-p mail-signature-file)
596 (insert-file-contents mail-signature-file))))
631 \\[mail-signature] mail-signature (insert `mail-signature-file' file).
792 (buffer-name rmail-summary-buffer)
824 (if (if buffer-file-name
899 ;; If buffer has no file, mark it as unmodified and delete auto-save.
900 (if (not buffer-file-name)
903 (delete-auto-save-file-if-necessary t))))))
918 (defvar sendmail-coding-system nil
919 "*Coding system for encoding the outgoing mail.
920 This has higher priority than `default-buffer-file-coding-system'
921 and `default-sendmail-coding-system',
922 but lower priority than the local value of `buffer-file-coding-system'.
923 See also the function `select-message-coding-system'.")
926 (defvar default-sendmail-coding-system 'iso-latin-1
927 "Default coding system for encoding the outgoing mail.
928 This variable is used only when `sendmail-coding-system' is nil.
932 instead use `sendmail-coding-system' to get a constant encoding
934 See also the function `select-message-coding-system'.")
938 (fullname (user-full-name))
988 ((eq mail-from-style 'system-default)
1003 (selected-coding (select-message-coding-system))
1071 ;;; (user-login-name))))
1074 ;;; (insert "Sender: " (user-login-name) "\n")))
1088 ;; Possibly add a MIME header for the current coding system
1095 selected-coding
1097 (coding-system-get selected-coding 'mime-charset))
1101 (symbol-name charset)
1122 (let* ((default-directory "/")
1123 (coding-system-for-write selected-coding)
1131 ;;; (and (equal (user-real-login-name) "root")
1132 ;;; (list "-f" (user-login-name)))
1133 (and mail-alias-file
1134 (list (concat "-oA" mail-alias-file)))
1151 (list "-N" (mapconcat 'symbol-name
1193 ;; This initial newline is written out if the fcc file already exists.
1194 (insert "\nFrom " (user-login-name) " "
1217 dont-write-the-file
1218 buffer-matches-file
1225 (setq buffer-matches-file
1227 (verify-visited-file-modtime buffer)))
1234 ;; function rmail-output-to-rmail-file:
1257 ;; Output file not in rmail mode
1262 (or buffer-matches-file
1264 (if (y-or-n-p (format "Save file %s? "
1267 (setq dont-write-the-file t))))
1269 ;; Append to the file directly,
1271 (unless dont-write-the-file
1272 (if (and (file-exists-p fcc)
1273 ;; Check that the file isn't empty. We don't
1275 ;; empty file.
1276 (not (zerop (nth 7 (file-attributes fcc))))
1277 (mail-file-babyl-p fcc))
1278 ;; If the file is a Babyl file,
1280 (let ((coding-system-for-write
1281 (or rmail-file-coding-system
1294 (and buffer (not dont-write-the-file)
1296 (set-visited-file-modtime))))))
1318 ;; Insert a copy, with altered header field name.
1351 "Add a new FCC field, with file name completion."
1407 "Sign letter with signature based on `mail-signature-file'.
1420 (insert-file-contents (expand-file-name mail-signature-file)))))
1454 Normally, indents each nonblank line ARG spaces (default 3).
1529 Normally, indents each nonblank line ARG spaces (default 3).
1577 (defun mail-attach-file (&optional file)
1578 "Insert a file at the end of the buffer, with separator lines around it."
1579 (interactive "fAttach file: ")
1586 (insert (format "===File %s===" file))
1593 (insert-file-contents file)
1599 ;; in middle of loading the file.
1609 Optionally, the signature file `mail-signature-file' can be inserted at the
1622 If `mail-default-reply-to' is non-nil, it should be an address (a string);
1625 If `mail-archive-file-name' is non-nil, an FCC field with that file name
1629 initialized. It can add more default fields to the message.
1686 ;;; (setq default-directory (expand-file-name "~/"))
1687 ;;; (auto-save-mode auto-save-default)
1690 ;;; (if (and buffer-auto-save-file-name
1691 ;;; (file-exists-p buffer-auto-save-file-name))
1692 ;;; (message "Auto save file for draft message exists; consider M-x mail-recover"))
1702 ;; Avoid danger that the auto-save file can't be written.
1703 (let ((dir (expand-file-name
1704 (file-name-as-directory mail-default-directory))))
1705 (if (file-exists-p dir)
1706 (setq default-directory dir)))
1707 ;; Only call auto-save-mode if necessary, to avoid changing auto-save file.
1708 (if (or (and auto-save-default (not buffer-auto-save-file-name))
1709 (and (not auto-save-default) buffer-auto-save-file-name))
1710 (auto-save-mode auto-save-default))
1712 ;; Disconnect the buffer from its visited file
1713 ;; (in case the user has actually visited a file *mail*).
1714 ;;; (set-visited-file-name nil)
1718 (if buffer-file-name
1721 (if (y-or-n-p "Disconnect buffer from visited file? ")
1722 (set-visited-file-name nil))
1724 (when (y-or-n-p "Reinitialize buffer, and disconnect it from the visited file? ")
1725 (set-visited-file-name nil)
1727 ;; A non-file-visiting buffer.
1735 (if (and buffer-auto-save-file-name
1736 (file-exists-p buffer-auto-save-file-name))
1737 (message "Auto save file for draft message exists; consider M-x mail-recover"))
1743 (let ((file-name (make-auto-save-file-name))
1746 ;; Remove the random part from the auto-save-file-name, and
1748 ;; Note: this knows that make-auto-save-file-name appends
1749 ;; "#<RANDOM-STUFF>#" to the buffer name, where RANDOM-STUFF
1750 ;; is the result of (make-temp-name "").
1752 (- (length file-name) (length (make-temp-name "")) 1))
1753 (setq wildcard (concat (substring file-name 0 non-random-len) "*"))
1754 (if (null (file-expand-wildcards wildcard))
1756 ;; Bind dired-trivial-filenames to t because all auto-save file
1759 ;; file instead.
1765 (or (looking-at " Move to the draft file you want to recover,")
1770 Move to the draft file you want to recover, then type C-c C-c
1772 To browse text of a draft, type v on the draft file's line.
1775 type d on a line to mark that file for deletion.
1787 (let ((coding-system-for-read 'emacs-mule-unix))
1788 (dired-view-file))))
1795 (coding-system-for-read 'emacs-mule-unix))
1799 (insert-file-contents fname nil)
1800 ;; insert-file-contents will set buffer-file-coding-system
1804 ;; crashed. We therefore reset buffer-file-coding-system
1805 ;; to the default value, so that either the default does
1808 (setq buffer-file-coding-system
1809 default-buffer-file-coding-system))))))))
1814 If the mail buffer has a current valid auto-save file,
1815 the command recovers that file. Otherwise, it displays a
1823 (let ((dir (expand-file-name
1824 (file-name-as-directory mail-default-directory))))
1825 (if (file-exists-p dir)
1826 (setq default-directory dir)))
1829 (let ((file-name buffer-auto-save-file-name))
1830 (cond ((and file-name (file-exists-p file-name))
1836 (dired-noselect file-name
1845 (format "Recover mail draft from auto save file %s? "
1846 file-name)))
1849 (buffer-coding buffer-file-coding-system)
1852 (coding-system-for-read 'emacs-mule-unix))
1854 (insert-file-contents file-name nil)
1855 (setq buffer-file-coding-system buffer-coding)))))