[gnus git] branch master updated: m0-13-88-g14ff48b =1= Remove fboundp checks from mailcap-mime-data
Katsumi Yamaoka <[email protected]> Thu, 22 Oct 2015 02:08:39 +0200
| Newsgroups | gmane.emacs.gnus.cvs |
|---|---|
| Message-ID | <[email protected]> |
via 14ff48baa718a7bae029928503145ee520001253 (commit)
from 8373f981040121c64b886cd90e62dfa939fe37db (commit)
- Log -----------------------------------------------------------------
commit 14ff48baa718a7bae029928503145ee520001253
Author: Katsumi Yamaoka <[email protected]>
Date: Thu Oct 22 00:08:03 2015 +0000
Remove fboundp checks from mailcap-mime-data
* mailcap.el (mailcap-mime-data): Remove fboundp checks.
(mailcap-viewer-passes-test): Do it instead. Thanks to Stefan Monnier.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 40c16da..c8a919b 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
+2015-10-22 Katsumi Yamaoka <[email protected]>
+
+ * mailcap.el (mailcap-mime-data): Remove fboundp checks.
+ (mailcap-viewer-passes-test): Do it instead. Thanks to Stefan Monnier.
+
2015-10-21 Katsumi Yamaoka <[email protected]>
* mailcap.el (mailcap-mailcap-entry-passes-test): Doc fix.
diff --git a/lisp/mailcap.el b/lisp/mailcap.el
index d888110..11a071b 100644
--- a/lisp/mailcap.el
+++ b/lisp/mailcap.el
@@ -96,11 +96,9 @@ This is a compatibility function for different Emacsen."
(type . "application/vnd.ms-excel"))
("x-x509-ca-cert"
(viewer . ssl-view-site-cert)
- (test . (fboundp 'ssl-view-site-cert))
(type . "application/x-x509-ca-cert"))
("x-x509-user-cert"
(viewer . ssl-view-user-cert)
- (test . (fboundp 'ssl-view-user-cert))
(type . "application/x-x509-user-cert"))
("octet-stream"
(viewer . mailcap-save-binary-file)
@@ -129,23 +127,18 @@ This is a compatibility function for different Emacsen."
(type . "application/x-tar"))
("x-latex"
(viewer . tex-mode)
- (test . (fboundp 'tex-mode))
(type . "application/x-latex"))
("x-tex"
(viewer . tex-mode)
- (test . (fboundp 'tex-mode))
(type . "application/x-tex"))
("latex"
(viewer . tex-mode)
- (test . (fboundp 'tex-mode))
(type . "application/latex"))
("tex"
(viewer . tex-mode)
- (test . (fboundp 'tex-mode))
(type . "application/tex"))
("texinfo"
(viewer . texinfo-mode)
- (test . (fboundp 'texinfo-mode))
(type . "application/tex"))
("zip"
(viewer . mailcap-save-binary-file)
@@ -155,13 +148,11 @@ This is a compatibility function for different Emacsen."
("pdf"
(viewer . pdf-view-mode)
(type . "application/pdf")
- (test . (and (fboundp 'pdf-view-mode)
- (eq window-system 'x))))
+ (test . (eq window-system 'x)))
("pdf"
(viewer . doc-view-mode)
(type . "application/pdf")
- (test . (and (fboundp 'doc-view-mode)
- (eq window-system 'x))))
+ (test . (eq window-system 'x)))
("pdf"
(viewer . "gv -safer %s")
(type . "application/pdf")
@@ -202,7 +193,6 @@ This is a compatibility function for different Emacsen."
("copiousoutput"))
("sieve"
(viewer . sieve-mode)
- (test . (fboundp 'sieve-mode))
(type . "application/sieve"))
("pgp-keys"
(viewer . "gpg --import --interactive --verbose")
@@ -223,7 +213,6 @@ This is a compatibility function for different Emacsen."
(type . "message/rfc822"))
("rfc-*822"
(viewer . vm-mode)
- (test . (fboundp 'vm-mode))
(type . "message/rfc822"))
("rfc-*822"
(viewer . view-mode)
@@ -260,18 +249,15 @@ This is a compatibility function for different Emacsen."
("text"
("plain"
(viewer . view-mode)
- (test . (fboundp 'view-mode))
(type . "text/plain"))
("plain"
(viewer . fundamental-mode)
(type . "text/plain"))
("enriched"
(viewer . enriched-decode)
- (test . (fboundp 'enriched-decode))
(type . "text/enriched"))
("dns"
(viewer . dns-mode)
- (test . (fboundp 'dns-mode))
(type . "text/dns")))
("video"
("mpeg"
@@ -288,8 +274,7 @@ This is a compatibility function for different Emacsen."
("archive"
("tar"
(viewer . tar-mode)
- (type . "archive/tar")
- (test . (fboundp 'tar-mode)))))
+ (type . "archive/tar"))))
"The mailcap structure is an assoc list of assoc lists.
1st assoc list is keyed on the major content-type
2nd assoc list is keyed on the minor content-type (which can be a regexp)
@@ -310,9 +295,9 @@ attribute name (viewer, test, etc). This looks like:
FLAG)
Where VIEWERINFO specifies how the content-type is viewed. Can be
-a string, in which case it is run through a shell, with
-appropriate parameters, or a symbol, in which case the symbol is
-`funcall'ed, with the buffer as an argument.
+a string, in which case it is run through a shell, with appropriate
+parameters, or a symbol, in which case the symbol is `funcall'ed if
+and only if it exists as a function, with the buffer as an argument.
TESTINFO is a test for the viewer's applicability, or nil. If nil, it
means the viewer is always valid. If it is a Lisp function, it is
@@ -658,10 +643,12 @@ to supply to the test."
(let* ((test-info (assq 'test viewer-info))
(test (cdr test-info))
(otest test)
- (viewer (cdr (assoc 'viewer viewer-info)))
+ (viewer (cdr (assq 'viewer viewer-info)))
(default-directory (expand-file-name "~/"))
status parsed-test cache result)
- (cond ((setq cache (assoc test mailcap-viewer-test-cache))
+ (cond ((not (or (stringp viewer) (fboundp viewer)))
+ nil) ; Non-existent Lisp function
+ ((setq cache (assoc test mailcap-viewer-test-cache))
(cadr cache))
((not test-info) t) ; No test clause
(t
-----------------------------------------------------------------------
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we listed those
revisions in full, above.
Summary of changes:
lisp/ChangeLog | 5 +++++
lisp/mailcap.el | 33 ++++++++++-----------------------
2 files changed, 15 insertions(+), 23 deletions(-)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Gnus Project".
The branch, master has been updated
hooks/post-receive
--
Gnus Project