From: Mark Buda <hermit@clark.net>
Subject: mailcap-viewer-lessp is just plain wrong
Date: 01 Nov 1999 14:42:08 -0500 [thread overview]
Message-ID: <87aeoyvw1b.fsf@pazuzu.eudaemonia.org> (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/
next reply other threads:[~1999-11-01 19:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-01 19:42 Mark Buda [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87aeoyvw1b.fsf@pazuzu.eudaemonia.org \
--to=hermit@clark.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).