From: Chris Hanson Date: Wed, 17 May 2000 13:41:08 +0000 (+0000) Subject: Fix bug: SELECTED-MESSAGE must not choose another message at random if X-Git-Tag: 20090517-FFI~3852 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=369bc783526f89aea11dfdce0b67c8e02e2b2cd8;p=mit-scheme.git Fix bug: SELECTED-MESSAGE must not choose another message at random if the buffer's message isn't valid. --- diff --git a/v7/src/imail/imail-top.scm b/v7/src/imail/imail-top.scm index 8e41bd80f..bad9e0a2e 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.46 2000/05/16 18:55:39 cph Exp $ +;;; $Id: imail-top.scm,v 1.47 2000/05/17 13:41:08 cph Exp $ ;;; ;;; Copyright (c) 1999-2000 Massachusetts Institute of Technology ;;; @@ -494,18 +494,15 @@ With prefix argument N moves backward N messages with these flags." (let ((buffer (if (or (default-object? buffer) (not buffer)) (selected-buffer) - buffer))) - (let ((folder (selected-folder #f buffer)) - (message (buffer-get buffer 'IMAIL-MESSAGE 'UNKNOWN))) + buffer)) + (error? (if (default-object? error?) #t error?))) + (let ((message (buffer-get buffer 'IMAIL-MESSAGE 'UNKNOWN))) (if (eq? message 'UNKNOWN) (error "IMAIL-MESSAGE property not bound:" buffer)) (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?) + (message-folder message) + message) + (and error? (error "No selected IMAIL message.")))))) (define (imail-update-mode-line! buffer)