changeset 48526:cd3075e04573

(mail-signature): Handle case where value of mail-signature is a string.
author Richard M. Stallman <rms@gnu.org>
date Sun, 24 Nov 2002 19:02:14 +0000
parents 1782b835b59e
children ba7cb9f8dfc3
files lisp/mail/sendmail.el
diffstat 1 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mail/sendmail.el	Sun Nov 24 19:01:18 2002 +0000
+++ b/lisp/mail/sendmail.el	Sun Nov 24 19:02:14 2002 +0000
@@ -1259,7 +1259,7 @@
   (goto-char (mail-text-start)))
 
 (defun mail-signature (&optional atpoint)
-  "Sign letter with contents of the file `mail-signature-file'.
+  "Sign letter with signature based on `mail-signature-file'.
 Prefix arg means put contents at point."
   (interactive "P")
   (save-excursion
@@ -1269,8 +1269,10 @@
     (end-of-line)
     (or atpoint
 	(delete-region (point) (point-max)))
-    (insert "\n\n-- \n")
-    (insert-file-contents (expand-file-name mail-signature-file))))
+    (if (stringp mail-signature)
+	(insert mail-signature)
+      (insert "\n\n-- \n")
+      (insert-file-contents (expand-file-name mail-signature-file)))))
 
 (defun mail-fill-yanked-message (&optional justifyp)
   "Fill the paragraphs of a message yanked into this one.