Function: mh-mairix-next-result

mh-mairix-next-result is a byte-compiled function defined in mh-search.el.gz.

Signature

(mh-mairix-next-result)

Documentation

Return next result from mairix output.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-search.el.gz
(defun mh-mairix-next-result ()
  "Return next result from mairix output."
  (prog1
      (cl-block nil
        (when (or (eobp) (and (bolp) (eolp)))
          (cl-return nil))
        (unless (eq (char-after) ?/)
          (cl-return 'error))
        (let ((start (point))
              end msg-start)
          (setq end (line-end-position))
          (unless (search-forward mh-mairix-folder end t)
            (cl-return 'error))
          (goto-char (match-beginning 0))
          (unless (equal (point) start)
            (cl-return 'error))
          (goto-char end)
          (unless (search-backward "/" start t)
            (cl-return 'error))
          (setq msg-start (1+ (point)))
          (goto-char start)
          (unless (search-forward mh-user-path end t)
            (cl-return 'error))
          (list (format "+%s" (buffer-substring-no-properties
                               (point) (1- msg-start)))
                (string-to-number
                 (buffer-substring-no-properties msg-start end))
                nil)))
    (forward-line)))