# HG changeset patch # User Satyaki Das # Date 1141622501 0 # Node ID ba3b5c60823ec999016c185f72dab0a40ac32542 # Parent c379d6c262b11850990247b8e5c2c7f83a219b00 (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 -r c379d6c262b1 -r ba3b5c60823e lisp/mh-e/ChangeLog --- 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 + + * 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 -r c379d6c262b1 -r ba3b5c60823e lisp/mh-e/mh-search.el --- 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: