aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/mail
diff options
context:
space:
mode:
authorJim Blandy1992-08-19 03:54:51 +0000
committerJim Blandy1992-08-19 03:54:51 +0000
commitef15f270dbada67b43f58cc26056fb7efe083ceb (patch)
tree31a6893cbd6f878b0d86abcb6c34efa536a5bdda /lisp/mail
parentfbfed6f05fdf5bf363ca5691aefde4d573ce8203 (diff)
downloademacs-ef15f270dbada67b43f58cc26056fb7efe083ceb.tar.gz
emacs-ef15f270dbada67b43f58cc26056fb7efe083ceb.zip
*** empty log message ***
Diffstat (limited to 'lisp/mail')
-rw-r--r--lisp/mail/sendmail.el27
1 files changed, 12 insertions, 15 deletions
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 7296a524099..54d04e79506 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -69,9 +69,10 @@ nil means use indentation.")
69(defvar mail-abbrevs-loaded nil) 69(defvar mail-abbrevs-loaded nil)
70(defvar mail-mode-map nil) 70(defvar mail-mode-map nil)
71 71
72(defvar mail-signature nil 72;;;###autoload
73 "*Text inserted at end of mail buffer when a message is initialized. 73(defvar mail-signature-file "~/.signature"
74If t, it means to insert the contents of the file `~/.signature'.") 74 "*Name of file to insert at the end of the mail buffer.
75The text is inserted when the message is initialized.")
75 76
76(defvar mail-reply-buffer nil) 77(defvar mail-reply-buffer nil)
77(defvar mail-send-actions nil 78(defvar mail-send-actions nil
@@ -122,14 +123,10 @@ so you can edit or delete these lines.")
122 (insert "BCC: " (user-login-name) "\n")) 123 (insert "BCC: " (user-login-name) "\n"))
123 (if mail-archive-file-name 124 (if mail-archive-file-name
124 (insert "FCC: " mail-archive-file-name "\n")) 125 (insert "FCC: " mail-archive-file-name "\n"))
125 (insert mail-header-separator "\n") 126 (insert mail-header-separator "\n\n")
126 ;; Read the .signature file if we haven't already done so 127 ;; Read the .signature file.
127 ;; (and if the user has not overridden it). 128 (if mail-signature-file
128 (cond ((eq mail-signature t) 129 (insert-file-contents (expand-file-name mail-signature-file)))
129 (insert "--\n")
130 (insert-file-contents "~/.signature"))
131 (mail-signature
132 (insert mail-signature)))
133 (goto-char (point-max)) 130 (goto-char (point-max))
134 (or (bolp) (newline))) 131 (or (bolp) (newline)))
135 (if to (goto-char (point-max))) 132 (if to (goto-char (point-max)))
@@ -480,7 +477,7 @@ the user from the mailer."
480 (search-forward (concat "\n" mail-header-separator "\n"))) 477 (search-forward (concat "\n" mail-header-separator "\n")))
481 478
482(defun mail-signature (atpoint) 479(defun mail-signature (atpoint)
483 "Sign letter with contents of ~/.signature file." 480 "Sign letter with contents of mail-signature-file."
484 (interactive "P") 481 (interactive "P")
485 (save-excursion 482 (save-excursion
486 (or atpoint 483 (or atpoint
@@ -490,7 +487,7 @@ the user from the mailer."
490 (or atpoint 487 (or atpoint
491 (delete-region (point) (point-max))) 488 (delete-region (point) (point-max)))
492 (insert "\n\n--\n") 489 (insert "\n\n--\n")
493 (insert-file-contents (expand-file-name "~/.signature")))) 490 (insert-file-contents (expand-file-name mail-signature-file))))
494 491
495(defun mail-fill-yanked-message (&optional justifyp) 492(defun mail-fill-yanked-message (&optional justifyp)
496 "Fill the paragraphs of a message yanked into this one. 493 "Fill the paragraphs of a message yanked into this one.
@@ -554,8 +551,8 @@ and don't delete any header fields."
554When this function returns, the buffer `*mail*' is selected. 551When this function returns, the buffer `*mail*' is selected.
555The value is t if the message was newly initialized; otherwise, nil. 552The value is t if the message was newly initialized; otherwise, nil.
556 553
557By default, the signature file `~/.signature' is inserted at the end; 554By default, the file named by the variable `mail-signature-file' is
558see the variable `mail-signature'. 555inserted at the end; by default, this is \"~/.signature\".
559 556
560\\<mail-mode-map> 557\\<mail-mode-map>
561While editing message, type \\[mail-send-and-exit] to send the message and exit. 558While editing message, type \\[mail-send-and-exit] to send the message and exit.