Gnus development mailing list
 help / color / mirror / Atom feed
* mailcap-viewer-lessp is just plain wrong
@ 1999-11-01 19:42 Mark Buda
  1999-11-01 21:24 ` Shenghuo ZHU
  0 siblings, 1 reply; 6+ messages in thread
From: Mark Buda @ 1999-11-01 19:42 UTC (permalink / raw)


In pgnus-0.97/lisp/mailcap.el, this seems to be just wrong:

(defun mailcap-viewer-lessp (x y)
  ;; Return t iff 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-lisp (not y-lisp))
      t)
     ((and (not y-lisp) x-wild (not y-wild))
      t)
     ((and (not x-wild) y-wild)
      t)
     (t nil))))

Shouldn't it be more like:

; blah blah blah
    (cond
     ((and x-lisp (not y-wild))
      t)
     ((and y-wild (not x-wild))
      t)
     ((and y-wild (not y-lisp))
      t)
     (t nil))))
?

Even if mine isn't right, the existing function is just wrong. How can
X be better if only one is wild, regardless of which one is wild?
-- 
I get my monkeys for nothing and my chimps for free.
http://www.clark.net/pub/hermit/


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-11-04 15:49 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-01 19:42 mailcap-viewer-lessp is just plain wrong Mark Buda
1999-11-01 21:24 ` Shenghuo ZHU
1999-11-02 13:55   ` Mark Buda
1999-11-03 20:33     ` Shenghuo ZHU
1999-11-04 11:17       ` Toby Speight
1999-11-04 15:49         ` Shenghuo ZHU

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).