Function: rmail-probe
rmail-probe is a byte-compiled function defined in rmail.el.gz.
Signature
(rmail-probe PROG)
Documentation
Determine what flavor of movemail PROG is.
We do this by executing it with --version and analyzing its output.
Source Code
;; Defined in /usr/src/emacs/lisp/mail/rmail.el.gz
(defun rmail-probe (prog)
"Determine what flavor of movemail PROG is.
We do this by executing it with `--version' and analyzing its output."
(with-temp-buffer
(let ((tbuf (current-buffer)))
(buffer-disable-undo tbuf)
(call-process prog nil tbuf nil "--version")
(if (not (buffer-modified-p tbuf))
;; Should not happen...
nil
(goto-char (point-min))
(cond
((looking-at ".*movemail: invalid option")
'emacs) ;; Possibly...
((looking-at "movemail (GNU Mailutils")
'mailutils)
(t
;; FIXME:
'emacs))))))