Mercurial > emacs
comparison lisp/mail/sendmail.el @ 13116:61c560010274
(mail-signature-file): New variable.
Fix various doc strings to mention it.
(mail-signature): Use mail-signature-file.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Wed, 04 Oct 1995 19:34:25 +0000 |
parents | b9cc587a5d8b |
children | fa3108c53fc3 |
comparison
equal
deleted
inserted
replaced
13115:b4601a8c1e5c | 13116:61c560010274 |
---|---|
144 nil) | 144 nil) |
145 | 145 |
146 ;;;###autoload | 146 ;;;###autoload |
147 (defvar mail-signature nil | 147 (defvar mail-signature nil |
148 "*Text inserted at end of mail buffer when a message is initialized. | 148 "*Text inserted at end of mail buffer when a message is initialized. |
149 If t, it means to insert the contents of the file `~/.signature'.") | 149 If t, it means to insert the contents of the file `mail-signature-file'.") |
150 | |
151 (defvar mail-signature-file "~/.signature" | |
152 "*File containing the text inserted at end of mail buffer.") | |
150 | 153 |
151 (defvar mail-reply-buffer nil) | 154 (defvar mail-reply-buffer nil) |
152 (defvar mail-send-actions nil | 155 (defvar mail-send-actions nil |
153 "A list of actions to be performed upon successful sending of a message.") | 156 "A list of actions to be performed upon successful sending of a message.") |
154 | 157 |
260 (insert "FCC: " mail-archive-file-name "\n")) | 263 (insert "FCC: " mail-archive-file-name "\n")) |
261 (insert mail-header-separator "\n") | 264 (insert mail-header-separator "\n") |
262 ;; Insert the signature. But remember the beginning of the message. | 265 ;; Insert the signature. But remember the beginning of the message. |
263 (if to (setq to (point))) | 266 (if to (setq to (point))) |
264 (cond ((eq mail-signature t) | 267 (cond ((eq mail-signature t) |
265 (if (file-exists-p "~/.signature") | 268 (if (file-exists-p mail-signature-file) |
266 (progn | 269 (progn |
267 (insert "\n\n-- \n") | 270 (insert "\n\n-- \n") |
268 (insert-file-contents "~/.signature")))) | 271 (insert-file-contents mail-signature-file)))) |
269 (mail-signature | 272 (mail-signature |
270 (insert mail-signature))) | 273 (insert mail-signature))) |
271 (goto-char (point-max)) | 274 (goto-char (point-max)) |
272 (or (bolp) (newline))) | 275 (or (bolp) (newline))) |
273 (if to (goto-char to)) | 276 (if to (goto-char to)) |
283 C-c C-f move to a header field (and create it if there isn't): | 286 C-c C-f move to a header field (and create it if there isn't): |
284 C-c C-f C-t move to To: C-c C-f C-s move to Subject: | 287 C-c C-f C-t move to To: C-c C-f C-s move to Subject: |
285 C-c C-f C-c move to CC: C-c C-f C-b move to BCC: | 288 C-c C-f C-c move to CC: C-c C-f C-b move to BCC: |
286 C-c C-f C-f move to FCC: | 289 C-c C-f C-f move to FCC: |
287 C-c C-t mail-text (move to beginning of message text). | 290 C-c C-t mail-text (move to beginning of message text). |
288 C-c C-w mail-signature (insert `~/.signature' file). | 291 C-c C-w mail-signature (insert `mail-signature-file' file). |
289 C-c C-y mail-yank-original (insert current message, in Rmail). | 292 C-c C-y mail-yank-original (insert current message, in Rmail). |
290 C-c C-q mail-fill-yanked-message (fill what was yanked). | 293 C-c C-q mail-fill-yanked-message (fill what was yanked). |
291 C-c C-v mail-sent-via (add a Sent-via field for each To or CC)." | 294 C-c C-v mail-sent-via (add a Sent-via field for each To or CC)." |
292 (interactive) | 295 (interactive) |
293 (kill-all-local-variables) | 296 (kill-all-local-variables) |
806 (expand-abbrev) | 809 (expand-abbrev) |
807 (goto-char (point-min)) | 810 (goto-char (point-min)) |
808 (search-forward (concat "\n" mail-header-separator "\n"))) | 811 (search-forward (concat "\n" mail-header-separator "\n"))) |
809 | 812 |
810 (defun mail-signature (atpoint) | 813 (defun mail-signature (atpoint) |
811 "Sign letter with contents of the file `~/.signature'. | 814 "Sign letter with contents of the file `mail-signature-file'. |
812 Prefix arg means put contents at point." | 815 Prefix arg means put contents at point." |
813 (interactive "P") | 816 (interactive "P") |
814 (save-excursion | 817 (save-excursion |
815 (or atpoint | 818 (or atpoint |
816 (goto-char (point-max))) | 819 (goto-char (point-max))) |
817 (skip-chars-backward " \t\n") | 820 (skip-chars-backward " \t\n") |
818 (end-of-line) | 821 (end-of-line) |
819 (or atpoint | 822 (or atpoint |
820 (delete-region (point) (point-max))) | 823 (delete-region (point) (point-max))) |
821 (insert "\n\n-- \n") | 824 (insert "\n\n-- \n") |
822 (insert-file-contents (expand-file-name "~/.signature")))) | 825 (insert-file-contents (expand-file-name mail-signature-file)))) |
823 | 826 |
824 (defun mail-fill-yanked-message (&optional justifyp) | 827 (defun mail-fill-yanked-message (&optional justifyp) |
825 "Fill the paragraphs of a message yanked into this one. | 828 "Fill the paragraphs of a message yanked into this one. |
826 Numeric argument means justify as well." | 829 Numeric argument means justify as well." |
827 (interactive "P") | 830 (interactive "P") |
904 (defun mail (&optional noerase to subject in-reply-to cc replybuffer actions) | 907 (defun mail (&optional noerase to subject in-reply-to cc replybuffer actions) |
905 "Edit a message to be sent. Prefix arg means resume editing (don't erase). | 908 "Edit a message to be sent. Prefix arg means resume editing (don't erase). |
906 When this function returns, the buffer `*mail*' is selected. | 909 When this function returns, the buffer `*mail*' is selected. |
907 The value is t if the message was newly initialized; otherwise, nil. | 910 The value is t if the message was newly initialized; otherwise, nil. |
908 | 911 |
909 Optionally, the signature file `~/.signature' can be inserted at the end; | 912 Optionally, the signature file `mail-signature-file' can be inserted at the |
910 see the variable `mail-signature'. | 913 end; see the variable `mail-signature'. |
911 | 914 |
912 \\<mail-mode-map> | 915 \\<mail-mode-map> |
913 While editing message, type \\[mail-send-and-exit] to send the message and exit. | 916 While editing message, type \\[mail-send-and-exit] to send the message and exit. |
914 | 917 |
915 Various special commands starting with C-c are available in sendmail mode | 918 Various special commands starting with C-c are available in sendmail mode |