From: Chris Hanson Date: Fri, 7 Apr 2000 20:45:55 +0000 (+0000) Subject: Add hook to notice modifications to folders and reflect them in the X-Git-Tag: 20090517-FFI~4075 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=c659335697d3ce2fe01ba9b0f3ec7a5accaedb42;p=mit-scheme.git Add hook to notice modifications to folders and reflect them in the mode line. --- diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index c84414ce7..e4386d119 100644 --- a/v7/src/imail/imail-top.scm +++ b/v7/src/imail/imail-top.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: imail-top.scm,v 1.17 2000/04/07 20:34:14 cph Exp $ +;;; $Id: imail-top.scm,v 1.18 2000/04/07 20:45:55 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -113,12 +113,19 @@ May be called with an IMAIL folder URL as argument; (define (associate-imail-folder-with-buffer folder buffer) (buffer-put! buffer 'IMAIL-FOLDER folder) - (folder-put! folder 'BUFFER buffer)) + (folder-put! folder 'BUFFER buffer) + (add-event-receiver! (folder-modification-event folder) + notice-folder-modifications)) (define (imail-folder->buffer folder error?) (or (folder-get folder 'BUFFER #f) (and error? (error:bad-range-argument folder 'IMAIL-FOLDER->BUFFER)))) +(define (notice-folder-modifications folder) + (let ((buffer (imail-folder->buffer folder #f))) + (if buffer + (imail-update-mode-line! buffer)))) + (define (selected-folder #!optional error? buffer) (let ((buffer (if (or (default-object? buffer) (not buffer))