Function: mailcap-viewer-lessp

mailcap-viewer-lessp is a byte-compiled function defined in mailcap.el.gz.

Signature

(mailcap-viewer-lessp X Y)

Documentation

Return t if viewer X is more desirable than viewer Y.

Source Code

;; Defined in /usr/src/emacs/lisp/net/mailcap.el.gz
;;;
;;; The main whabbo
;;;

(defun mailcap-viewer-lessp (x y)
  "Return t if viewer X is more desirable than viewer Y."
  (let ((x-wild (string-match "[*?]" (or (cdr-safe (assq 'type x)) "")))
	(y-wild (string-match "[*?]" (or (cdr-safe (assq 'type y)) "")))
	(x-lisp (not (stringp (or (cdr-safe (assq 'viewer x)) ""))))
	(y-lisp (not (stringp (or (cdr-safe (assq 'viewer y)) "")))))
    (cond
     ((and x-wild (not y-wild))
      nil)
     ((and (not x-wild) y-wild)
      t)
     ((and (not y-lisp) x-lisp)
      t)
     (t nil))))