Function: mh-index-write-data

mh-index-write-data is a byte-compiled function defined in mh-search.el.gz.

Signature

(mh-index-write-data)

Documentation

Write index data to file.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-search.el.gz
;;; Serialization of Index Data

(defun mh-index-write-data ()
  "Write index data to file."
  (ignore-errors
    (unless (eq major-mode 'mh-folder-mode)
      (error "Can't be called from folder in \"%s\"" major-mode))
    (let ((data mh-index-data)
          (msg-checksum-map mh-index-msg-checksum-map)
          (checksum-origin-map mh-index-checksum-origin-map)
          (previous-search mh-index-previous-search)
          (sequence-search-flag mh-index-sequence-search-flag)
          (outfile (concat buffer-file-name mh-index-data-file))
          (print-length nil)
          (print-level nil))
      (with-temp-file outfile
        (mh-index-write-hashtable
         data (lambda (x) (cl-loop for y being the hash-keys of x collect y)))
        (mh-index-write-hashtable msg-checksum-map #'identity)
        (mh-index-write-hashtable checksum-origin-map #'identity)
        (pp previous-search (current-buffer)) (insert "\n")
        (pp sequence-search-flag (current-buffer)) (insert "\n")))))