From b44df59698b5b285d51b6b62713828b31d56d1d0 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 8 May 2000 15:46:20 +0000 Subject: [PATCH] Change handling of SELECTED-MESSAGE to ignore message if it is detached or from the wrong folder, instead selecting default message from current folder. --- v7/src/imail/imail-top.scm | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) 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.")))))) -- 2.25.1