changeset 69298:ba3b5c60823e

(mh-index-update-single-msg): Fix a bug in the handling of duplicate messages. The test in cond was too strong and wasn't catching the case where origin-map was nil.
author Satyaki Das <satyaki@theforce.stanford.edu>
date Mon, 06 Mar 2006 05:21:41 +0000
parents c379d6c262b1
children 9fea7c43a780
files lisp/mh-e/ChangeLog lisp/mh-e/mh-search.el
diffstat 2 files changed, 19 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/mh-e/ChangeLog	Mon Mar 06 04:49:42 2006 +0000
+++ b/lisp/mh-e/ChangeLog	Mon Mar 06 05:21:41 2006 +0000
@@ -1,3 +1,9 @@
+2006-03-05  Satyaki Das  <satyaki@theforce.stanford.edu>
+
+	* mh-search.el (mh-index-update-single-msg): Fix a bug in the
+	handling of duplicate messages.  The test in cond was too strong
+	and wasn't catching the case where origin-map was nil.
+
 2006-03-05  Bill Wohler  <wohler@newt.com>
 
 	Release MH-E version 7.93.
--- a/lisp/mh-e/mh-search.el	Mon Mar 06 04:49:42 2006 +0000
+++ b/lisp/mh-e/mh-search.el	Mon Mar 06 05:21:41 2006 +0000
@@ -1907,22 +1907,24 @@
 
 This function should only be called in the appropriate index
 folder buffer."
-  (cond ((and origin-map (gethash checksum mh-index-checksum-origin-map))
-         (let* ((intermediate (gethash msg origin-map))
-                (ofolder (car intermediate))
-                (omsg (cdr intermediate)))
-           ;; This is most probably a duplicate. So eliminate it.
-           (call-process "rm" nil nil nil
-                         (format "%s%s/%s" mh-user-path
-                                 (substring mh-current-folder 1) msg))
-           (when (gethash ofolder mh-index-data)
-             (remhash omsg (gethash ofolder mh-index-data)))))
+  (cond ((gethash checksum mh-index-checksum-origin-map)
+         (when origin-map
+           (let* ((intermediate (gethash msg origin-map))
+                  (ofolder (car intermediate))
+                  (omsg (cdr intermediate)))
+             ;; This is most probably a duplicate. So eliminate it.
+             (call-process "rm" nil nil nil
+                           (format "%s%s/%s" mh-user-path
+                                   (substring mh-current-folder 1) msg))
+             (when (gethash ofolder mh-index-data)
+               (remhash omsg (gethash ofolder mh-index-data))))))
         (t
          (setf (gethash msg mh-index-msg-checksum-map) checksum)
-         (when origin-map
+         (when (and origin-map (gethash msg origin-map))
            (setf (gethash checksum mh-index-checksum-origin-map)
                  (gethash msg origin-map))))))
 
+
 (provide 'mh-search)
 
 ;; Local Variables: