Mercurial > emacs
comparison lisp/gnus/mailcap.el @ 90288:7432ca837c8d
Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-9
Merge from emacs--devo--0
Patches applied:
* emacs--devo--0 (patch 16-33)
- Update from CVS
- Install ERC.
- Fix ERC compiler warnings.
- Use utf-8 encoding in ERC ChangeLogs.
- Merge ERC-related Viper hacks into Viper.
- Merge from erc--main--0
- Merge from gnus--rel--5.10
* gnus--rel--5.10 (patch 8-13)
- Merge from emacs--devo--0
- Update from CVS
author | Miles Bader <miles@gnu.org> |
---|---|
date | Wed, 01 Feb 2006 10:07:17 +0000 |
parents | 5b7d410e31f9 04c2548593f7 |
children | 95d0cdf160ea |
comparison
equal
deleted
inserted
replaced
90287:3cd97358d81a | 90288:7432ca837c8d |
---|---|
1 ;;; mailcap.el --- MIME media types configuration | 1 ;;; mailcap.el --- MIME media types configuration |
2 | 2 |
3 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, | 3 ;; Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, |
4 ;; 2005 Free Software Foundation, Inc. | 4 ;; 2005, 2006 Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: William M. Perry <wmperry@aventail.com> | 6 ;; Author: William M. Perry <wmperry@aventail.com> |
7 ;; Lars Magne Ingebrigtsen <larsi@gnus.org> | 7 ;; Lars Magne Ingebrigtsen <larsi@gnus.org> |
8 ;; Keywords: news, mail, multimedia | 8 ;; Keywords: news, mail, multimedia |
9 | 9 |
638 (test (cdr test-info)) | 638 (test (cdr test-info)) |
639 (otest test) | 639 (otest test) |
640 (viewer (cdr (assoc 'viewer viewer-info))) | 640 (viewer (cdr (assoc 'viewer viewer-info))) |
641 (default-directory (expand-file-name "~/")) | 641 (default-directory (expand-file-name "~/")) |
642 status parsed-test cache result) | 642 status parsed-test cache result) |
643 (if (setq cache (assoc test mailcap-viewer-test-cache)) | 643 (cond ((setq cache (assoc test mailcap-viewer-test-cache)) |
644 (cadr cache) | 644 (cadr cache)) |
645 (setq | 645 ((not test-info) t) ; No test clause |
646 result | 646 (t |
647 (cond | 647 (setq |
648 ((not test-info) t) ; No test clause | 648 result |
649 ((not test) nil) ; Already failed test | 649 (cond |
650 ((eq test t) t) ; Already passed test | 650 ((not test) nil) ; Already failed test |
651 ((functionp test) ; Lisp function as test | 651 ((eq test t) t) ; Already passed test |
652 (funcall test type-info)) | 652 ((functionp test) ; Lisp function as test |
653 ((and (symbolp test) ; Lisp variable as test | 653 (funcall test type-info)) |
654 (boundp test)) | 654 ((and (symbolp test) ; Lisp variable as test |
655 (symbol-value test)) | 655 (boundp test)) |
656 ((and (listp test) ; List to be eval'd | 656 (symbol-value test)) |
657 (symbolp (car test))) | 657 ((and (listp test) ; List to be eval'd |
658 (eval test)) | 658 (symbolp (car test))) |
659 (t | 659 (eval test)) |
660 (setq test (mailcap-unescape-mime-test test type-info) | 660 (t |
661 test (list shell-file-name nil nil nil | 661 (setq test (mailcap-unescape-mime-test test type-info) |
662 shell-command-switch test) | 662 test (list shell-file-name nil nil nil |
663 status (apply 'call-process test)) | 663 shell-command-switch test) |
664 (eq 0 status)))) | 664 status (apply 'call-process test)) |
665 (push (list otest result) mailcap-viewer-test-cache) | 665 (eq 0 status)))) |
666 result))) | 666 (push (list otest result) mailcap-viewer-test-cache) |
667 result)))) | |
667 | 668 |
668 (defun mailcap-add-mailcap-entry (major minor info) | 669 (defun mailcap-add-mailcap-entry (major minor info) |
669 (let ((old-major (assoc major mailcap-mime-data))) | 670 (let ((old-major (assoc major mailcap-mime-data))) |
670 (if (null old-major) ; New major area | 671 (if (null old-major) ; New major area |
671 (setq mailcap-mime-data | 672 (setq mailcap-mime-data |