From: Satyaki Das Date: Mon, 6 Mar 2006 05:21:41 +0000 (+0000) Subject: (mh-index-update-single-msg): Fix a bug in the X-Git-Tag: emacs-pretest-22.0.90~3773 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=1af028e6bda9eee909f3ee566c970483b6416359;p=emacs.git (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. --- diff --git a/lisp/mh-e/ChangeLog b/lisp/mh-e/ChangeLog index 93af45f133e..83d2e3aa427 100644 --- a/lisp/mh-e/ChangeLog +++ b/lisp/mh-e/ChangeLog @@ -1,3 +1,9 @@ +2006-03-05 Satyaki Das + + * 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 Release MH-E version 7.93. diff --git a/lisp/mh-e/mh-search.el b/lisp/mh-e/mh-search.el index 9980b6a9b68..17b63c91000 100644 --- a/lisp/mh-e/mh-search.el +++ b/lisp/mh-e/mh-search.el @@ -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: