From: Chris Hanson Date: Mon, 8 May 2000 15:46:20 +0000 (+0000) Subject: Change handling of SELECTED-MESSAGE to ignore message if it is X-Git-Tag: 20090517-FFI~3917 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=b44df59698b5b285d51b6b62713828b31d56d1d0;p=mit-scheme.git Change handling of SELECTED-MESSAGE to ignore message if it is detached or from the wrong folder, instead selecting default message from current folder. --- diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index 402bd0352..581cdd94e 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.36 2000/05/05 17:18:17 cph Exp $ +;;; $Id: imail-top.scm,v 1.37 2000/05/08 15:46:20 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -524,8 +524,14 @@ With prefix argument N moves backward N messages with these flags." (if (or (default-object? buffer) (not buffer)) (selected-buffer) buffer))) - (let ((message (buffer-get buffer 'IMAIL-MESSAGE #f))) - (or message + (let ((folder (selected-folder #f buffer)) + (message (buffer-get buffer 'IMAIL-MESSAGE #f))) + (or (and message + (if (eqv? folder (message-folder message)) + message + (let ((message (first-unseen-message folder))) + (buffer-put! buffer 'IMAIL-MESSAGE message) + message))) (and (if (default-object? error?) #t error?) (error "No selected IMAIL message."))))))