program.
;;; -*-Scheme-*-
;;;
-;;; $Id: dos.scm,v 1.40 1996/10/09 15:44:28 cph Exp $
+;;; $Id: dos.scm,v 1.41 1996/10/10 10:29:20 cph Exp $
;;;
;;; Copyright (c) 1992-96 Massachusetts Institute of Technology
;;;
(define (os/write-file-methods) '())
(define (os/alternate-pathnames group pathname) group pathname '())
+(define (os/rmail-spool-directory) #f)
+(define (os/rmail-primary-inbox-list system-mailboxes) system-mailboxes '())
(define (os/sendmail-program) "sendmail.exe")
(define (os/rmail-pop-procedure) #f)
(define (os/hostname) (error "OS/HOSTNAME procedure unimplemented."))
#| -*-Scheme-*-
-$Id: edwin.pkg,v 1.198 1996/10/07 18:20:31 cph Exp $
+$Id: edwin.pkg,v 1.199 1996/10/10 10:30:00 cph Exp $
Copyright (c) 1989-96 Massachusetts Institute of Technology
fetch-all-fields
fetch-first-field
fetch-last-field
+ guarantee-rmail-variables-initialized
make-in-reply-to-field
prompt-for-rmail-output-filename
rfc822-addresses->string
;;; -*-Scheme-*-
;;;
-;;; $Id: notify.scm,v 1.16 1995/04/09 22:33:28 cph Exp $
+;;; $Id: notify.scm,v 1.17 1996/10/10 10:29:52 cph Exp $
;;;
;;; Copyright (c) 1992-95 Massachusetts Institute of Technology
;;;
(define-variable mail-notify-directory
"Directory in which MAIL-NOTIFY checks for mail."
- (pathname-as-directory "/usr/mail/")
- file-directory?)
+ #f
+ (lambda (object) (or (not object) (file-directory? object))))
(define (notifier:mail-present)
+ (if (not (ref-variable mail-notify-directory))
+ (begin
+ (guarantee-rmail-variables-initialized)
+ (set-variable! mail-notify-directory rmail-spool-directory)))
(if (let ((pathname
(merge-pathnames (ref-variable mail-notify-directory)
(current-user-name))))
;;; -*-Scheme-*-
;;;
-;;; $Id: os2.scm,v 1.34 1996/10/09 15:44:46 cph Exp $
+;;; $Id: os2.scm,v 1.35 1996/10/10 10:29:08 cph Exp $
;;;
;;; Copyright (c) 1994-96 Massachusetts Institute of Technology
;;;
(define (os/quit dir)
dir
(error "Can't quit."))
+
+(define (os/hostname)
+ (if (not os2/cached-hostname)
+ (let ((buffer (temporary-buffer "*hostname*")))
+ (let ((status.reason
+ (run-synchronous-process #f (buffer-end buffer) #f #f
+ "hostname")))
+ (if (not (equal? status.reason '(EXITED . 0)))
+ (begin
+ (pop-up-buffer buffer)
+ (error "Error running HOSTNAME program:" status.reason))))
+ (set! os2/cached-hostname (string-trim (buffer-string buffer)))
+ (kill-buffer buffer)))
+ os2/cached-hostname)
+
+(define os2/cached-hostname #f)
+(add-event-receiver! event:after-restore
+ (lambda ()
+ (set! os2/cached-hostname #f)
+ unspecific))
\f
;;;; OS/2 Clipboard Interface
(define (os/sendmail-program)
"sendmail")
+(define (os/rmail-spool-directory)
+ (or (let ((etc (get-environment-variable "ETC")))
+ (and etc
+ (file-directory? etc)
+ (let ((mail
+ (merge-pathnames "mail/" (pathname-as-directory etc))))
+ (and (file-directory? mail)
+ (->namestring mail)))))
+ "c:\\mptn\\etc\\mail\\"))
+
+(define (os/rmail-primary-inbox-list system-mailboxes)
+ system-mailboxes)
+
(define (os/rmail-pop-procedure)
(and (dos/find-program "popclient" (ref-variable exec-path) #f)
(lambda (server user-name password directory)
"If true, messages are deleted from the POP server after being retrieved.
Otherwise, messages remain on the server and will be re-fetched later."
#t
- boolean?)
-
-(define (os/hostname)
- (if (not os2/cached-hostname)
- (let ((buffer (temporary-buffer "*hostname*")))
- (let ((status.reason
- (run-synchronous-process #f (buffer-end buffer) #f #f
- "hostname")))
- (if (not (equal? status.reason '(EXITED . 0)))
- (begin
- (pop-up-buffer buffer)
- (error "Error running HOSTNAME program:" status.reason))))
- (set! os2/cached-hostname (string-trim (buffer-string buffer)))
- (kill-buffer buffer)))
- os2/cached-hostname)
-
-(define os2/cached-hostname #f)
-(add-event-receiver! event:after-restore
- (lambda ()
- (set! os2/cached-hostname #f)
- unspecific))
\ No newline at end of file
+ boolean?)
\ No newline at end of file
;;; -*-Scheme-*-
;;;
-;;; $Id: rmail.scm,v 1.52 1996/09/30 01:01:39 cph Exp $
+;;; $Id: rmail.scm,v 1.53 1996/10/10 10:28:22 cph Exp $
;;;
;;; Copyright (c) 1991-96 Massachusetts Institute of Technology
;;;
(declare (usual-integrations))
\f
(define rmail-spool-directory
- "/usr/mail/")
+ #f)
(define-variable rmail-file-name
""
t Toggle header, show Rmail header if unformatted or vice versa.
w Edit the current message. C-c C-c to return to Rmail."
(lambda (buffer)
- (guarantee-variables-initialized)
+ (guarantee-rmail-variables-initialized)
(define-variable-local-value! buffer
(ref-variable-object mode-line-modified)
"--- ")
(lambda (buffer)
(enable-group-undo! (buffer-group buffer))))
-(define (guarantee-variables-initialized)
+(define (guarantee-rmail-variables-initialized)
+ (if (not rmail-spool-directory)
+ (set! rmail-spool-directory (os/rmail-spool-directory)))
(if (not (ref-variable rmail-pop-procedure))
(set-variable! rmail-pop-procedure (os/rmail-pop-procedure)))
(if (null? (ref-variable rmail-primary-inbox-list))
- (set-variable!
- rmail-primary-inbox-list
- (list "~/mbox"
- (let ((server
- (and (ref-variable rmail-pop-procedure)
- (ref-variable rmail-primary-pop-server))))
- (if server
- (string-append "pop:" server)
- (string-append rmail-spool-directory
- (current-user-name)))))))
+ (set-variable! rmail-primary-inbox-list
+ (os/rmail-primary-inbox-list
+ (list
+ (let ((server
+ (and (ref-variable rmail-pop-procedure)
+ (ref-variable rmail-primary-pop-server))))
+ (if server
+ (string-append "pop:" server)
+ (string-append rmail-spool-directory
+ (current-user-name))))))))
(if (not (ref-variable rmail-dont-reply-to-names))
(set-variable!
rmail-dont-reply-to-names
(let ((start (buffer-start error-buffer))
(end (buffer-end error-buffer)))
(run-synchronous-process false start false false
- (->namestring
- (edwin-etc-pathname "movemail"))
+ (os/find-program "movemail"
+ (edwin-etc-directory))
(->namestring source)
(->namestring target))
(if (mark< start end)
;;; -*-Scheme-*-
;;;
-;;; $Id: unix.scm,v 1.72 1996/10/02 17:00:35 cph Exp $
+;;; $Id: unix.scm,v 1.73 1996/10/10 10:28:48 cph Exp $
;;;
;;; Copyright (c) 1989-96 Massachusetts Institute of Technology
;;;
(define os/restore-modes-to-updated-file!
set-file-modes!)
+(define (os/rmail-spool-directory)
+ (or (list-search-positive
+ '("/var/spool/mail/" "/var/mail/" "/usr/spool/mail/" "/usr/mail/")
+ file-directory?)
+ "/usr/spool/mail/"))
+
+(define (os/rmail-primary-inbox-list system-mailboxes)
+ (cons "~/mbox" system-mailboxes))
+
(define (os/sendmail-program)
- (if (file-exists? "/usr/lib/sendmail")
- "/usr/lib/sendmail"
+ (or (list-search-positive
+ '("/usr/lib/sendmail" "/usr/sbin/sendmail" "/usr/ucblib/sendmail")
+ file-executable?)
"fakemail"))
(define (os/hostname)