Function: mh-index-read-data

mh-index-read-data is an autoloaded and byte-compiled function defined in mh-search.el.gz.

Signature

(mh-index-read-data)

Documentation

Read index data from file.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-search.el.gz
;;;###mh-autoload
(defun mh-index-read-data ()
  "Read index data from file."
  (ignore-errors
    (unless (eq major-mode 'mh-folder-mode)
      (error "Can't be called from folder in \"%s\"" major-mode))
    (let ((infile (concat buffer-file-name mh-index-data-file))
          t1 t2 t3 t4 t5)
      (with-temp-buffer
        (insert-file-contents-literally infile)
        (goto-char (point-min))
        (setq t1 (mh-index-read-hashtable
                  (lambda (data)
                    (cl-loop with table = (make-hash-table :test #'equal)
                             for x in data do (setf (gethash x table) t)
                             finally return table)))
              t2 (mh-index-read-hashtable #'identity)
              t3 (mh-index-read-hashtable #'identity)
              t4 (read (current-buffer))
              t5 (read (current-buffer))))
      (setq mh-index-data t1
            mh-index-msg-checksum-map t2
            mh-index-checksum-origin-map t3
            mh-index-previous-search t4
            mh-index-sequence-search-flag t5))))