| Server IP : 217.160.0.212 / Your IP : 216.73.216.141 Web Server : Apache System : Linux www 6.18.51-i1-ampere #1196 SMP Fri Sep 11 20:43:55 CEST 2026 aarch64 User : sws1073854427 ( 1073854427) PHP Version : 8.4.23 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /usr/share/emacs/28.2/lisp/net/ |
Upload File : |
;ELC
;;; Compiled
;;; in Emacs version 28.2
;;; with all optimizations.
(byte-code "\300\301!\210\302\303\304\"\210\305\306\307\310\311\312\313\314&\210\315\316\317\320\321DD\322\323\324%\207" [require cl-lib autoload mail-header-parse-content-type "mail-parse" custom-declare-group mailcap nil "Definition of viewers for MIME types." :version "21.1" :group mime custom-declare-variable mailcap-prefer-mailcap-viewers funcall function #[0 "\300\207" [t] 1 ""] "If non-nil, prefer viewers specified in ~/.mailcap.\nIf nil, the most specific viewer will be chosen, even if there is\na general override in ~/.mailcap. For instance, if /etc/mailcap\nhas an entry for \"image/gif\", that one will be chosen even if\nyou have an entry for \"image/*\" in your ~/.mailcap file." :type boolean] 8)
#@45 A syntax table for parsing SGML attributes.
(defvar mailcap-parse-args-syntax-table (byte-code "\301!\302\303\304#\210\302\305\304#\210\302\306\307#\210\302\310\311#\210\207" [emacs-lisp-mode-syntax-table copy-syntax-table modify-syntax-entry 39 "\"" 96 123 "(" 125 ")"] 5) (#$ . 803))
#@68 Shell command (including switches) used to print PostScript files.
(defvar mailcap-print-command (byte-code "\302\303\304\300!\203\f \202
\305\304\301!\205 ;\203 C\202 B\306#\207" [lpr-command lpr-switches mapconcat identity boundp "lpr" " "] 5) (#$ . 1100))
#@12
(fn SYM)
(defalias 'mailcap--get-user-mime-data #[257 "\300!\301\211\203# \211@\302\236A\303\236A\304\236AEB\262A\266\202\202 \210\211\237\207" [default-value nil viewer type test] 9 (#$ . 1373)])
#@16
(fn SYM VAL)
(defalias 'mailcap--set-user-mime-data #[514 "\300\211\2033 \211@\211\242\243\211\242\243\211\242\243\301B\302B\205# \303BCBB B\262 \266A\266\202\202 \210\304\237\"\207" [nil viewer type test set-default] 15 (#$ . 1587)])
(byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315\316\317&
\207" [custom-declare-variable mailcap-user-mime-data funcall function #[0 "\300\207" [nil] 1 ""] "A list of viewers preferred for different MIME types.\nThe elements of the list are alists of the following structure\n\n ((viewer . VIEWER)\n (type . MIME-TYPE)\n (test . TEST))\n\nwhere VIEWER is either a Lisp command, e.g., a major mode, or a\nstring containing a shell command for viewing files of the\ndefined MIME-TYPE. In case of a shell command, %s will be\nreplaced with the file.\n\nMIME-TYPE is a regular expression being matched against the\nactual MIME type. It is implicitly surrounded with ^ and $.\n\nTEST is a Lisp form which is evaluated in order to test if the\nentry should be chosen. The `test' entry is optional.\n\nWhen selecting a viewer for a given MIME type, the first viewer\nin this list with a matching MIME-TYPE and successful TEST is\nselected. Only if none matches, the standard `mailcap-mime-data'\nis consulted." :version "26.1" :type (repeat (list (choice (function :tag "Function or mode") (string :tag "Shell command")) (regexp :tag "MIME Type") (sexp :tag "Test (optional)"))) :get mailcap--get-user-mime-data :set mailcap--set-user-mime-data :group mailcap] 14)
#@1437 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)
Which looks like:
-----------------
(("application"
("postscript" . <info>))
("text"
("plain" . <info>)))
Where <info> is another assoc list of the various information
related to the mailcap RFC 1524. This is keyed on the lowercase
attribute name (viewer, test, etc). This looks like:
((viewer . VIEWERINFO)
(test . TESTINFO)
(xxxx . "STRING")
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 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
called with a list of items from any extra fields from the
Content-Type header as argument to return a boolean value for the
validity. Otherwise, if it is a non-function Lisp symbol or list
whose car is a symbol, it is `eval'uated to yield the validity. If it
is a string or list of strings, it represents a shell command to run
to return a true or false shell value for the validity.
The last matching entry in this structure takes precedence over
preceding entries.
(defvar mailcap-mime-data (byte-code "\301\302\303\304\305\306\307\310\311\312\313\314\315\316\317\320\321\322\323\324\325\326PB\257\321\327\330\325\331PB\332BBBB\321\333\334\325\331PB\335BBBB\321\336\337B\340\325\331PB\341BBBB\342\343\344\345\325\346PB\347BBBBB\342\350\351\352\325\346PB\353BBBBB\342\354\355\356\325\346PB\357BBBBB\360BBBBBBBBBBBBBBBBBBBBBBB\361B\207" [mailcap-print-command "application" ("vnd\\.ms-excel" (viewer . "gnumeric %s") (test getenv "DISPLAY") (type . "application/vnd.ms-excel")) ("octet-stream" (viewer . mailcap-save-binary-file) (non-viewer . t) (type . "application/octet-stream")) ("dvi" (viewer . "xdvi -safer %s") (test eq window-system 'x) ("needsx11") (type . "application/dvi") ("print" . "dvips -qRP %s")) ("dvi" (viewer . "dvitty %s") (test not (getenv "DISPLAY")) (type . "application/dvi") ("print" . "dvips -qRP %s")) ("emacs-lisp" (viewer . mailcap-maybe-eval) (type . "application/emacs-lisp")) ("x-emacs-lisp" (viewer . mailcap-maybe-eval) (type . "application/x-emacs-lisp")) ("x-tar" (viewer . mailcap-save-binary-file) (non-viewer . t) (type . "application/x-tar")) ("x-latex" (viewer . tex-mode) (type . "application/x-latex")) ("x-tex" (viewer . tex-mode) (type . "application/x-tex")) ("latex" (viewer . tex-mode) (type . "application/latex")) ("tex" (viewer . tex-mode) (type . "application/tex")) ("texinfo" (viewer . texinfo-mode) (type . "application/tex")) ("zip" (viewer . mailcap-save-binary-file) (non-viewer . t) (type . "application/zip") ("copiousoutput")) ("pdf" (viewer . doc-view-mode) (type . "application/pdf") (test . window-system)) ("pdf" (viewer . pdf-view-mode) (type . "application/pdf") (test . window-system)) "pdf" (viewer . "gv -safer %s") (type . "application/pdf") (test . window-system) "print" "pdf2ps %s - | " (viewer . "gpdf %s") (type . "application/pdf") "pdftops %s - | " ((test eq window-system 'x)) (viewer . "xpdf %s") (type . "application/pdf") ((test eq window-system 'x)) viewer "pdftotext %s -" (type . "application/pdf") (("copiousoutput")) "postscript" (viewer . "gv -safer %s") (type . "application/postscript") (test . window-system) " %s" (("needsx11")) (viewer . "ghostview -dSAFER %s") (type . "application/postscript") (test eq window-system 'x) (("needsx11")) (viewer . "ps2ascii %s") (type . "application/postscript") (test not (getenv "DISPLAY")) (("copiousoutput")) (("sieve" (viewer . sieve-mode) (type . "application/sieve")) ("pgp-keys" (viewer . "gpg --import --interactive --verbose") (type . "application/pgp-keys") ("needsterminal"))) (("audio" ("x-mpeg" (viewer . "maplay %s") (type . "audio/x-mpeg")) (".*" (viewer . "showaudio") (type . "audio/*"))) ("message" ("rfc-*822" (viewer . mm-view-message) (test and (featurep 'gnus) (gnus-alive-p)) (type . "message/rfc822")) ("rfc-*822" (viewer . vm-mode) (type . "message/rfc822")) ("rfc-*822" (viewer . view-mode) (type . "message/rfc822"))) ("image" ("x-xwd" (viewer . "xwud -in %s") (type . "image/x-xwd") ("compose" . "xwd -frame > %s") (test eq window-system 'x) ("needsx11")) ("x11-dump" (viewer . "xwud -in %s") (type . "image/x-xwd") ("compose" . "xwd -frame > %s") (test eq window-system 'x) ("needsx11")) ("windowdump" (viewer . "xwud -in %s") (type . "image/x-xwd") ("compose" . "xwd -frame > %s") (test eq window-system 'x) ("needsx11")) (".*" (viewer . "display %s") (type . "image/*") (test eq window-system 'x) ("needsx11"))) ("text" ("plain" (viewer . view-mode) (type . "text/plain")) ("plain" (viewer . fundamental-mode) (type . "text/plain")) ("enriched" (viewer . enriched-decode) (type . "text/enriched")) ("dns" (viewer . dns-mode) (type . "text/dns"))) ("video" ("mpeg" (viewer . "mpeg_play %s") (type . "video/mpeg") (test eq window-system 'x) ("needsx11"))) ("x-world" ("x-vrml" (viewer . "webspace -remote %s -URL %u") (type . "x-world/x-vrml") ("description" "VRML document"))) ("archive" ("tar" (viewer . tar-mode) (type . "archive/tar"))))] 29) (#$ . 3140))
(put 'mailcap-mime-data 'risky-local-variable t)
#@101 Computed version of the mailcap data incorporating all sources.
Same format as `mailcap-mime-data'.
(defvar mailcap--computed-mime-data nil (#$ . 8592))
(byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable mailcap-download-directory funcall function #[0 "\300\207" [nil] 1 ""] "Directory to which `mailcap-save-binary-file' downloads files by default.\nnil means your home directory." :type (choice (const :tag "Home directory" nil) directory) :group mailcap] 8)
#@58 Systems that don't have a Unix-like directory hierarchy.
(defvar mailcap-poor-system-types '(ms-dos windows-nt) (#$ . 9095))
(defalias 'mailcap-save-binary-file #[0 "eb\210\302\216\303\304\206\f \305\"\306\307ed#)\262)\207" [mailcap-download-directory require-final-newline #[0 "\300p!\207" [kill-buffer] 2] read-file-name "Filename to save as: " "~/" nil write-region] 5])
#@168 Text of warning message displayed by `mailcap-maybe-eval'.
Make sure that this text consists only of few text lines. Otherwise,
Gnus might fail to display all of it.
(defvar mailcap-maybe-eval-warning "*** WARNING ***\n\nThis MIME part contains untrusted and possibly harmful content.\nIf you evaluate the Emacs Lisp code contained in it, a lot of nasty\nthings can happen. Please examine the code very carefully before you\ninstruct Emacs to evaluate it. You can browse the buffer containing\nthe code using \\[scroll-other-window].\n\nIf you are unsure what to do, please answer \"no\"." (#$ . 9480))
#@45 Maybe evaluate a buffer of Emacs Lisp code.
(defalias 'mailcap-maybe-eval #[0 "peb\210\301 \302\303\"\216\304 \210\305\306!\302\307\"\216r\211q\210\310!c\210eb\210\311!\210\312\313!*\262)\262\2036 \314p!\210\315!\205C r\211q\210\316 )\207" [mailcap-maybe-eval-warning current-window-configuration make-closure #[0 "\301\300!\207" [V0 set-window-configuration] 2] delete-other-windows generate-new-buffer "*Warning*" #[0 "\301\300!\207" [V0 kill-buffer] 2] substitute-command-keys display-buffer yes-or-no-p "This is potentially dangerous emacs-lisp code, evaluate it? " eval-buffer buffer-live-p emacs-lisp-mode] 6 (#$ . 10092)])
#@25
(fn REGEXP TO-STRING)
(defalias 'mailcap-replace-regexp #[514 "eb\210\300\301\302#\205 \303\302\301#\210\202 \207" [re-search-forward nil t replace-match] 6 (#$ . 10735)])
(defvar mailcap-parsed-p nil)
#@381 Parse out all the mailcaps specified in a path string PATH.
Components of PATH are separated by the `path-separator' character
appropriate for this system. If FORCE, re-parse even if already
parsed. If PATH is omitted, use the value of environment variable
MAILCAPS if set; otherwise (on Unix) use the path from RFC 1524, plus
/usr/local/etc/mailcap.
(fn &optional PATH FORCE)
(defalias 'mailcap-parse-mailcaps #[512 "\203 \211\205\262 \306\n\306\211:\203H @\262\211A\262\242\262\306\211:\203? @\262\211A\262\242\262\307#\210A\262\202! \266A\262\202
\266\204k \310\311!\203\\ \310\311!\262\202k \f>\203h \312\262\202k \313\262\314;\203y \315
\316#\202z !\211\203\256 \211@\211:\205\211 \211A@;\203\222 \202\224 @\317!\203\245 \320!\203\245 \321\"\210\266A\266\202\202{ \210\316\211\207" [mailcap-parsed-p mailcap--computed-mime-data mailcap-mime-data system-type mailcap-poor-system-types path-separator nil mailcap-add-mailcap-entry getenv "MAILCAPS" (("~/.mailcap" user) ("~/mail.cap" user) ("~/etc/mail.cap" user)) (("~/.mailcap" user) ("/etc/mailcap" system) ("/usr/etc/mailcap" system) ("/usr/local/etc/mailcap" system)) reverse split-string t file-readable-p file-regular-p mailcap-parse-mailcap] 12 (#$ . 10950) (list nil t)])
#@128 Parse out the mailcap file specified by FNAME.
If SOURCE, mark the entry with this as the source.
(fn FNAME &optional SOURCE)
(defalias 'mailcap-parse-mailcap #[513 "\301\211\211\211\211\302\303\304\"r\211q\210\305\306\"\216\307!\210\310!\210\311\312\313\"\210\311\314\315\"\210\311\316\317\"\210db\210\320\301x\210`d|\210o?\2057\320\301x\210\321 \210`\262\301\262\322\301w\210\323`\"\210`{\262\324\301w\210\313\262\301f\325=\203\226 \301u\210\324\301w\210`\262\326\301w\210\323`\"\210f\206| \327\330=\203\205 \331\202\224 `U\203\217 \331\202\224 \332`{!\262\324\301w\210\313\262\301f\333=\203\355 \301u\210\324\301w\210`\262\334\301w\210`Sf\335=\203\310 \336\337!\210\301u\210\334\301w\210\202\262 f\206\316 \327\340=\203\350 T`}\210eb\210\341p!db\210~\210\262\202\355 `{\262`\262\301\210\313\232\2041\342B\343\344\331\230\203\345\202
QBD\346`\"\244\262\347!\210\203)\350BC\244\262\351#\210\321 \210\2025 *\207" [mailcap-parse-args-syntax-table nil generate-new-buffer " *temp*" t make-closure #[0 "\301\300!\205 \302\300!\207" [V0 buffer-name kill-buffer] 2] insert-file-contents set-syntax-table mailcap-replace-regexp "#.*" "" "\\\\[ ]*\n" " " "\n+" "\n" " \n" beginning-of-line "^/; \n" downcase-region " " 47 "^; \n" 0 42 ".*" regexp-quote 59 "^;\n" 92 backward-delete-char 1 39 read viewer type "/" "*" mailcap-parse-mailcap-extras mailcap-mailcap-entry-passes-test source mailcap-add-mailcap-entry] 14 (#$ . 12238)])
#@60 Grab all the extra stuff from a mailcap entry.
(fn ST ND)
(defalias 'mailcap-parse-mailcap-extras #[514 "\300\211\211\211\211\211\214}\210eb\210\301\300w\210m\204\247 \300\262`\262\302\300w\210\303`\"\210`{\262\304\300w\210`f\305=\204= \306\262\202\217 \307\300w\210`\262f\310>\203e T\262\3111^ \312\313!\210\314u0\210\202\212 \210db\210\202\212 \211\204\212 \315\300w\210`Sf\316=\203\204 \317`S`\316\320$\210\321\300w\210\202e \306\262\202e `{\262\322\230\203\231 \323\202\232 BB\262\324\300w\210\202 )\207" [nil " \n ;" "^ \n =;" downcase-region " \n" 61 t " \n=" (34 39) (error) forward-sexp 1 -1 "^;" 92 subst-char-in-region 32 ";" "test" test " \";\n "] 13 (#$ . 13729)])
#@331 Replace the test clause of INFO itself with a boolean for some cases.
This function supports only `test -n $DISPLAY' and `test -z $DISPLAY',
replaces them with t or nil. As for others or if INFO has an interactive
spec (needsterm, needsterminal, or needsx11) but DISPLAY is not set,
the test clause will be unchanged.
(fn INFO)
(defalias 'mailcap-mailcap-entry-passes-test #[257 "\300\236\301\205
\302A\303\"\262\304\305\"\204$ \304\306\"\204$ \304\307\"\2030 \310\311!\2040 \301\262\202\204 \211@\312\232\203[ \211A@\313\232\203[ \3148\315\232\204O \3148\316\232\203[ \310\311!\205V \317\262\202\204 \211@\312\232\203\204 \211A@\320\232\203\204 \3148\315\232\204z \3148\316\232\203\204 \310\311!?\205\202 \317\262\205\220 <\205\220 \241\207" [test nil split-string " " assoc "needsterm" "needsterminal" "needsx11" getenv "DISPLAY" "test" "-n" 2 "$DISPLAY" "\"$DISPLAY\"" t "-z"] 6 (#$ . 14440)])
#@86 Return a list of possible viewers from MAJOR for minor type MINOR.
(fn MAJOR MINOR)
(defalias 'mailcap-possible-viewers #[514 "\300\211\2030 \211@\211\242\243\232\204\"