diff options
| author | Satyaki Das | 2006-03-06 05:21:41 +0000 |
|---|---|---|
| committer | Satyaki Das | 2006-03-06 05:21:41 +0000 |
| commit | 1af028e6bda9eee909f3ee566c970483b6416359 (patch) | |
| tree | c014c3a82259bcce5146dd989f6ce635779f2c47 /lisp | |
| parent | 1e0e9b382c9e983e32472dedff84da33118bc3f1 (diff) | |
| download | emacs-1af028e6bda9eee909f3ee566c970483b6416359.tar.gz emacs-1af028e6bda9eee909f3ee566c970483b6416359.zip | |
(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.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/mh-e/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/mh-e/mh-search.el | 24 |
2 files changed, 19 insertions, 11 deletions
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 @@ | |||
| 1 | 2006-03-05 Satyaki Das <satyaki@theforce.stanford.edu> | ||
| 2 | |||
| 3 | * mh-search.el (mh-index-update-single-msg): Fix a bug in the | ||
| 4 | handling of duplicate messages. The test in cond was too strong | ||
| 5 | and wasn't catching the case where origin-map was nil. | ||
| 6 | |||
| 1 | 2006-03-05 Bill Wohler <wohler@newt.com> | 7 | 2006-03-05 Bill Wohler <wohler@newt.com> |
| 2 | 8 | ||
| 3 | Release MH-E version 7.93. | 9 | 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 | |||
| 1907 | 1907 | ||
| 1908 | This function should only be called in the appropriate index | 1908 | This function should only be called in the appropriate index |
| 1909 | folder buffer." | 1909 | folder buffer." |
| 1910 | (cond ((and origin-map (gethash checksum mh-index-checksum-origin-map)) | 1910 | (cond ((gethash checksum mh-index-checksum-origin-map) |
| 1911 | (let* ((intermediate (gethash msg origin-map)) | 1911 | (when origin-map |
| 1912 | (ofolder (car intermediate)) | 1912 | (let* ((intermediate (gethash msg origin-map)) |
| 1913 | (omsg (cdr intermediate))) | 1913 | (ofolder (car intermediate)) |
| 1914 | ;; This is most probably a duplicate. So eliminate it. | 1914 | (omsg (cdr intermediate))) |
| 1915 | (call-process "rm" nil nil nil | 1915 | ;; This is most probably a duplicate. So eliminate it. |
| 1916 | (format "%s%s/%s" mh-user-path | 1916 | (call-process "rm" nil nil nil |
| 1917 | (substring mh-current-folder 1) msg)) | 1917 | (format "%s%s/%s" mh-user-path |
| 1918 | (when (gethash ofolder mh-index-data) | 1918 | (substring mh-current-folder 1) msg)) |
| 1919 | (remhash omsg (gethash ofolder mh-index-data))))) | 1919 | (when (gethash ofolder mh-index-data) |
| 1920 | (remhash omsg (gethash ofolder mh-index-data)))))) | ||
| 1920 | (t | 1921 | (t |
| 1921 | (setf (gethash msg mh-index-msg-checksum-map) checksum) | 1922 | (setf (gethash msg mh-index-msg-checksum-map) checksum) |
| 1922 | (when origin-map | 1923 | (when (and origin-map (gethash msg origin-map)) |
| 1923 | (setf (gethash checksum mh-index-checksum-origin-map) | 1924 | (setf (gethash checksum mh-index-checksum-origin-map) |
| 1924 | (gethash msg origin-map)))))) | 1925 | (gethash msg origin-map)))))) |
| 1925 | 1926 | ||
| 1927 | |||
| 1926 | (provide 'mh-search) | 1928 | (provide 'mh-search) |
| 1927 | 1929 | ||
| 1928 | ;; Local Variables: | 1930 | ;; Local Variables: |