]> git.eshelyaron.com Git - emacs.git/commitdiff
(mh-index-update-single-msg): Fix a bug in the
authorSatyaki Das <satyaki@theforce.stanford.edu>
Mon, 6 Mar 2006 05:21:41 +0000 (05:21 +0000)
committerSatyaki Das <satyaki@theforce.stanford.edu>
Mon, 6 Mar 2006 05:21:41 +0000 (05:21 +0000)
handling of duplicate messages.  The test in cond was too strong
and wasn't catching the case where origin-map was nil.

lisp/mh-e/ChangeLog
lisp/mh-e/mh-search.el

index 93af45f133e8540592e3ebd549fbd5bc868b54db..83d2e3aa427d61ba0610e7d79ad7a2f5e1e7b500 100644 (file)
@@ -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.
index 9980b6a9b6826b17ebff37bf5ff7a2c91e6ea1e9..17b63c91000882e60113479cf1475931bd574239 100644 (file)
@@ -1907,22 +1907,24 @@ copied from. The function updates the hash tables
 
 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: