Function: mh-index-update-single-msg
mh-index-update-single-msg is a byte-compiled function defined in
mh-search.el.gz.
Signature
(mh-index-update-single-msg MSG CHECKSUM ORIGIN-MAP)
Documentation
Update various maps for one message.
MSG is an index folder message, CHECKSUM its MD5 hash and
ORIGIN-MAP, if non-nil, a hash table containing which maps each
message in the index folder to the folder and message that it was
copied from. The function updates the hash tables
mh-index-msg-checksum-map and mh-index-checksum-origin-map.
This function should only be called in the appropriate index folder buffer.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-search.el.gz
(defun mh-index-update-single-msg (msg checksum origin-map)
"Update various maps for one message.
MSG is an index folder message, CHECKSUM its MD5 hash and
ORIGIN-MAP, if non-nil, a hash table containing which maps each
message in the index folder to the folder and message that it was
copied from. The function updates the hash tables
`mh-index-msg-checksum-map' and `mh-index-checksum-origin-map'.
This function should only be called in the appropriate index
folder buffer."
(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 (and origin-map (gethash msg origin-map))
(setf (gethash checksum mh-index-checksum-origin-map)
(gethash msg origin-map))))))