Fix bug in M-x rmail-search: when search locates the regexp in a
authorChris Hanson <org/chris-hanson/cph>
Tue, 22 Mar 1994 17:08:20 +0000 (17:08 +0000)
committerChris Hanson <org/chris-hanson/cph>
Tue, 22 Mar 1994 17:08:20 +0000 (17:08 +0000)
message that has not yet been selected, the mark yielded by the search
must be made permanent before the message is selected, because
selecting the message changes its attributes, and consequently alters
the amount of text preceding the mark.

v7/src/edwin/rmail.scm

index 9b76e68fa1701b394a44af93ea771f42c3b78d7b..31a6a057301dc09bc702b4701cd81b6ef1d270eb 100644 (file)
@@ -1,6 +1,6 @@
 ;;; -*-Scheme-*-
 ;;;
-;;;    $Id: rmail.scm,v 1.31 1994/02/21 21:47:46 cph Exp $
+;;;    $Id: rmail.scm,v 1.32 1994/03/22 17:08:20 cph Exp $
 ;;;
 ;;;    Copyright (c) 1991-1993 Massachusetts Institute of Technology
 ;;;
@@ -666,9 +666,10 @@ and reverse search is specified by a negative numeric arg."
                               (loop memo)))))))))
        (lambda (memo mark)
          (if memo
-             (begin
+             (let ((mark (mark-left-inserting-copy mark)))
                (select-message buffer memo)
                (set-current-point! mark)
+               (mark-temporary! mark)
                (message msg "done"))
              (editor-failure "Search failed: " regexp)))))))