From: Chris Hanson Date: Thu, 7 Aug 2003 01:46:34 +0000 (+0000) Subject: Change GUARANTEE-MAIL-ALIASES so that it reloads the aliases if the X-Git-Tag: 20090517-FFI~1825 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e10a53a5328394df03cad0f064e98fca32380bdb;p=mit-scheme.git Change GUARANTEE-MAIL-ALIASES so that it reloads the aliases if the file is changed. --- diff --git a/v7/src/edwin/malias.scm b/v7/src/edwin/malias.scm index e78468214..ebbe2b4bd 100644 --- a/v7/src/edwin/malias.scm +++ b/v7/src/edwin/malias.scm @@ -1,6 +1,6 @@ #| -*-Scheme-*- -$Id: malias.scm,v 1.9 2003/08/07 01:43:45 cph Exp $ +$Id: malias.scm,v 1.10 2003/08/07 01:46:34 cph Exp $ Copyright 1991,1997,1999,2003 Massachusetts Institute of Technology @@ -105,23 +105,18 @@ USA. (loop (cdr strings))))) (mark-temporary! point))))) -(define mail-aliases) +(define mail-aliases '()) (define mail-aliases-time #f) (define (guarantee-mail-aliases) (let ((filename "~/.mailrc")) (let ((t (file-modification-time filename))) - (if (not (and t - mail-aliases-time - (= t mail-aliases-time))) + (if (and t (not (eqv? t mail-aliases-time))) (begin - (set! mail-aliases '()) - (if t - (begin - (set! mail-aliases-time t) - (for-each (lambda (entry) - (define-mail-alias (car entry) (cdr entry))) - (parse-mailrc-file filename))))))))) + (set! mail-aliases-time t) + (for-each (lambda (entry) + (define-mail-alias (car entry) (cdr entry))) + (parse-mailrc-file filename))))))) (define (parse-mailrc-file filename) (call-with-input-file filename