Fixed bug in rmail-edit-current-msg which manifests only
authorBrian A. LaMacchia <edu/mit/csail/zurich/bal>
Wed, 29 Apr 1992 23:05:09 +0000 (23:05 +0000)
committerBrian A. LaMacchia <edu/mit/csail/zurich/bal>
Wed, 29 Apr 1992 23:05:09 +0000 (23:05 +0000)
on the last message in the RMAIL file.

v7/src/edwin/rmail.scm

index afe96b4a8af7a5a3a80f9c7ec0e1c36f04653a5d..7ce52e4aa6b849010582888899d8ac90faa92092 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/rmail.scm,v 1.17 1992/04/29 22:29:26 bal Exp $
+;;;    $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/edwin/rmail.scm,v 1.18 1992/04/29 23:05:09 bal Exp $
 ;;;
 ;;;    Copyright (c) 1991-92 Massachusetts Institute of Technology
 ;;;
@@ -1398,23 +1398,20 @@ buffer visiting that file."
         (message return-value)
         return-value)
        (lambda ()
-        (if (eq? return-value 'ABORT)
-            (begin
-              (with-buffer-open
-               (current-buffer)
-               (lambda ()
-                 (kill-string
-                  (msg-memo/start-body memo)
-                  (msg-memo/end-body memo))
-                 (insert-string original-message
-                                (msg-memo/start-body memo))))))
         (set-current-major-mode! (ref-mode-object rmail))
         (let ((buf (current-buffer)))
           (with-buffer-open
               buf
             (lambda ()
               (memoize-buffer buf)
-              (update-mode-line! buf)))
+              (update-mode-line! buf)
+              (if (eq? return-value 'ABORT)
+                  (let ((memo (msg-memo/nth (buffer-msg-memo buf) msg-num)))
+                    (kill-string
+                     (msg-memo/start-body memo)
+                     (msg-memo/end-body memo))
+                    (insert-string original-message
+                                   (msg-memo/start-body memo))))))
           (show-message buf msg-num)))))))
 \f
 ;;;; Undigestifier