Function: mh-read-msg-list
mh-read-msg-list is a byte-compiled function defined in mh-seq.el.gz.
Signature
(mh-read-msg-list)
Documentation
Return a list of message numbers from point to the end of the line.
Expands ranges into set of individual numbers.
Source Code
;; Defined in /usr/src/emacs/lisp/mh-e/mh-seq.el.gz
(defun mh-read-msg-list ()
"Return a list of message numbers from point to the end of the line.
Expands ranges into set of individual numbers."
(let ((msgs ())
(end-of-line (line-end-position))
num)
(while (re-search-forward "[0-9]+" end-of-line t)
(setq num (string-to-number (buffer-substring (match-beginning 0)
(match-end 0))))
(cond ((looking-at "-") ; Message range
(forward-char 1)
(re-search-forward "[0-9]+" end-of-line t)
(let ((num2 (string-to-number
(buffer-substring (match-beginning 0)
(match-end 0)))))
(if (< num2 num)
(error "Bad message range: %d-%d" num num2))
(while (<= num num2)
(setq msgs (cons num msgs))
(setq num (1+ num)))))
((not (zerop num)) ;"pick" outputs "0" to mean no match
(setq msgs (cons num msgs)))))
msgs))