From e10a53a5328394df03cad0f064e98fca32380bdb Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Thu, 7 Aug 2003 01:46:34 +0000 Subject: [PATCH] Change GUARANTEE-MAIL-ALIASES so that it reloads the aliases if the file is changed. --- v7/src/edwin/malias.scm | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) 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 -- 2.25.1