mh-read-range
mh-read-range is an autoloaded compiled Lisp function in `mh-seq.el
'.
(mh-read-range PROMPT &optional FOLDER DEFAULT EXPAND-FLAG ASK-FLAG NUMBER-AS-RANGE-FLAG)
Read a message range with PROMPT.
If FOLDER is non-nil then a range is read from that folder, otherwise
use `mh-current-folder'.
If DEFAULT is a string then use that as default range to return. If
DEFAULT is nil then ask user with default answer a range based on the
sequences that seem relevant. Finally if DEFAULT is t, try to avoid
prompting the user. Unseen messages, if present, are returned. If the
folder has fewer than `mh-large-folder' messages then "all" messages
are returned. Finally as a last resort prompt the user.
If EXPAND-FLAG is non-nil then a list of message numbers corresponding
to the input is returned. If this list is empty then an error is
raised. If EXPAND-FLAG is nil just return the input string. In this
case we don't check if the range is empty.
If ASK-FLAG is non-nil, then the user is always queried for a range of
messages. If ASK-FLAG is nil, then the function checks if the unseen
sequence is non-empty. If that is the case, `mh-unseen-seq', or the
list of messages in it depending on the value of EXPAND, is returned.
Otherwise if the folder has fewer than `mh-large-folder' messages then
the list of messages corresponding to "all" is returned. If neither
of the above holds then as a last resort the user is queried for a
range of messages.
If NUMBER-AS-RANGE-FLAG is non-nil, then if a number, N is read as
input, it is interpreted as the range "last:N".
This function replaces the existing function `mh-read-msg-range'.
Calls to:
(mh-read-msg-range folder flag)
should be replaced with:
(mh-read-range "Suitable prompt" folder t nil flag
mh-interpret-number-as-range-flag)