Change mail to insert both "From:" and "Reply-to:" addresses.
authorChris Hanson <org/chris-hanson/cph>
Mon, 14 Sep 1992 23:00:50 +0000 (23:00 +0000)
committerChris Hanson <org/chris-hanson/cph>
Mon, 14 Sep 1992 23:00:50 +0000 (23:00 +0000)
v7/src/6001/edextra.scm

index dc1219485a7a3ea527623d5fe147b034809cad23..94035d1b87800a1848945c96ab5dcca1ac67f305 100644 (file)
@@ -1,6 +1,6 @@
 #| -*-Scheme-*-
 
-$Id: edextra.scm,v 1.11 1992/09/10 07:32:09 cph Exp $
+$Id: edextra.scm,v 1.12 1992/09/14 23:00:50 cph Exp $
 
 Copyright (c) 1992 Massachusetts Institute of Technology
 
@@ -378,18 +378,22 @@ The following filenames are reserved and may not be used:
                       (ref-variable completion-ignored-extensions)))
 
 (set-variable!
- mail-default-reply-to
+ mail-header-function
  (let ((default-reply-to false))
-   (lambda ()
+   (lambda (point)
      (let ((reply-to
            (prompt-for-string "Please enter an email address for replies"
                               default-reply-to
                               'INSERTED-DEFAULT)))
-       (if (string-null? reply-to)
-          false
+       (if (not (string-null? reply-to))
           (begin
             (set! default-reply-to reply-to)
-            reply-to))))))
+            (insert-string "From: " point)
+            (insert-string reply-to point)
+            (insert-newline point)
+            (insert-string "Reply-to: " point)
+            (insert-string reply-to point)
+            (insert-newline point)))))))
 
 ;; Disable key bindings that exit the editor.
 ;; M-x logout is all the students should need.