Function: nnmairix-check-mairix-version
nnmairix-check-mairix-version is a byte-compiled function defined in
nnmairix.el.gz.
Signature
(nnmairix-check-mairix-version VERSION &optional SERVER)
Documentation
Check mairix VERSION on SERVER.
If VERSION is a number: specifies the minimum version. If VERSION is a string: must be contained in mairix version output.
Source Code
;; Defined in /usr/src/emacs/lisp/gnus/nnmairix.el.gz
(defun nnmairix-check-mairix-version (version &optional server)
"Check mairix VERSION on SERVER.
If VERSION is a number: specifies the minimum version.
If VERSION is a string: must be contained in mairix version output."
(unless server
(setq server nnmairix-current-server))
(let ((versionstring (cadr (assoc server nnmairix-version-output))))
(unless versionstring
;; call "mairix -V" to get the version string
(with-temp-buffer
(setq versionstring
(let* ((commandsplit (split-string nnmairix-mairix-command))
(args (append (list (car commandsplit))
'(nil t nil) (cdr commandsplit) '("-V"))))
(apply #'call-process args)
(goto-char (point-min))
(re-search-forward "mairix.*")
(match-string 0))))
;; save version string for current session
(setq nnmairix-version-output
(append nnmairix-version-output
(list (list server versionstring)))))
(cond
((stringp version)
(string-match version versionstring))
((numberp version)
(<= version (string-to-number
(progn
(string-match "mairix \\([0-9\\.]+\\)" versionstring)
(match-string 1 versionstring))))))))