Server IP : 111.118.215.189 / Your IP : 18.117.158.174 Web Server : Apache System : Linux md-in-83.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : a1673wkz ( 2475) PHP Version : 8.2.25 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /usr/share/emacs/24.3/lisp/gnus/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:10:15 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/gnus/mm-url.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\302%\210\310\311\312\313\314\315\316\317\307\304& \207" [require mm-util gnus custom-declare-group mm-url nil "A wrapper of url package and external url command for Gnus." :group custom-declare-variable mm-url-use-external (not (condition-case nil (require 'url) (error nil))) "*If non-nil, use external grab program `mm-url-program'." :version "22.1" :type boolean] 10) (defvar mm-url-predefined-programs '((wget "wget" "--user-agent=mm-url" "-q" "-O" "-") (w3m "w3m" "-dump_source") (lynx "lynx" "-source") (curl "curl" "--silent" "--user-agent" "mm-url" "--location"))) (byte-code "\300\301\302\303\304\305\306\307\310\311& \210\300\312\313\314\304\305\306\315\310\311& \207" [custom-declare-variable mm-url-program (cond ((executable-find "wget") 'wget) ((executable-find "w3m") 'w3m) ((executable-find "lynx") 'lynx) ((executable-find "curl") 'curl) (t "GET")) "The url grab program.\nLikely values are `wget', `w3m', `lynx' and `curl'." :version "22.1" :type (choice (symbol :tag "wget" wget) (symbol :tag "w3m" w3m) (symbol :tag "lynx" lynx) (symbol :tag "curl" curl) (string :tag "other")) :group mm-url mm-url-arguments nil "The arguments for `mm-url-program'." (repeat string)] 10) #@66 *An assoc list of entity names and how to actually display them. (defvar mm-url-html-entities '((quot . 34) (amp . 38) (rsquo . 39) (lt . 60) (gt . 62) (uarr . 94) (lsquo . 96) (lcub . 123) (rcub . 125) (tilde . 126) (nbsp . 160) (iexcl . 161) (cent . 162) (pound . 163) (curren . 164) (yen . 165) (brvbar . 166) (sect . 167) (uml . 168) (copy . 169) (ordf . 170) (laquo . 171) (not . 172) (shy . 173) (reg . 174) (macr . 175) (deg . 176) (plusmn . 177) (sup2 . 178) (sup3 . 179) (acute . 180) (micro . 181) (para . 182) (middot . 183) (cedil . 184) (sup1 . 185) (ordm . 186) (raquo . 187) (frac14 . 188) (frac12 . 189) (frac34 . 190) (iquest . 191) (Agrave . 192) (Aacute . 193) (Acirc . 194) (Atilde . 195) (Auml . 196) (Aring . 197) (AElig . 198) (Ccedil . 199) (Egrave . 200) (Eacute . 201) (Ecirc . 202) (Euml . 203) (Igrave . 204) (Iacute . 205) (Icirc . 206) (Iuml . 207) (ETH . 208) (Ntilde . 209) (Ograve . 210) (Oacute . 211) (Ocirc . 212) (Otilde . 213) (Ouml . 214) (times . 215) (Oslash . 216) (Ugrave . 217) (Uacute . 218) (Ucirc . 219) (Uuml . 220) (Yacute . 221) (THORN . 222) (szlig . 223) (agrave . 224) (aacute . 225) (acirc . 226) (atilde . 227) (auml . 228) (aring . 229) (aelig . 230) (ccedil . 231) (egrave . 232) (eacute . 233) (ecirc . 234) (euml . 235) (igrave . 236) (iacute . 237) (icirc . 238) (iuml . 239) (eth . 240) (ntilde . 241) (ograve . 242) (oacute . 243) (ocirc . 244) (otilde . 245) (ouml . 246) (divide . 247) (oslash . 248) (ugrave . 249) (uacute . 250) (ucirc . 251) (uuml . 252) (yacute . 253) (thorn . 254) (yuml . 255) (frac56 . "5/6") (frac16 . "1/6") (frac45 . "4/5") (frac35 . "3/5") (frac25 . "2/5") (frac15 . "1/5") (frac23 . "2/3") (frac13 . "1/3") (frac78 . "7/8") (frac58 . "5/8") (frac38 . "3/8") (frac18 . "1/8") (ndash . 45) (mdash . 45) (emsp . 32) (ensp . 32) (sim . 126) (le . "<=") (agr . "alpha") (rdquo . "''") (ldquo . "``") (trade . "(TM)")) (#$ . -1805)) #@92 A list of characters that are _NOT_ reserved in the URL spec. This is taken from RFC 2396. (defconst mm-url-unreserved-chars '(97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 48 49 50 51 52 53 54 55 56 57 45 95 46 33 126 42 39 40 41) (#$ . 3731)) #@34 Load `url-insert-file-contents'. (defalias 'mm-url-load-url #[nil "\300\301\302\217?\205 \303\304!\210\303\305!\207" [nil (byte-code "\300\301!\210\300\302!\210\300\303!\207" [require url-handlers url-parse url-vars] 2) ((error)) require w3-vars url] 3 (#$ . 4115)]) #@89 Insert file contents of URL. If `mm-url-use-external' is non-nil, use `mm-url-program'. (defalias 'mm-url-insert-file-contents #[(url) "\203- \306\307 \"\203 \310 \311\225S\312O!\210\202 \313 !\210eb\210\314\315!\203( \315 ! \316 D\207\317 \210\320\304!\205: \f\321\232?\205B \322\323BC\312\324 !\212eb\210\325\326\312\327#\203_ \330\331!\210\202P )\314\315!\203s <\203s \315 @! +\207" [mm-url-use-external url url-current-object buffer-file-name url-version result string-match "^file:/+" insert-file-contents 0 nil mm-url-insert-file-contents-external fboundp url-generic-parse-url buffer-size mm-url-load-url boundp "Emacs" "Connection" "Close" url-insert-file-contents re-search-forward " 1000 ?" t replace-match "" url-request-extra-headers name] 4 (#$ . 4389)]) #@53 Insert file contents of URL using `mm-url-program'. (defalias 'mm-url-insert-file-contents-external #[(url) "\306\211\n9\203 \n\236A\211@\307\fA C\")\202% \n\307 C\"\310\311 \306\312\306&\313=?\2058 \314\315 \"*\207" [args program mm-url-program mm-url-predefined-programs item url nil append apply call-process t 0 error "Couldn't fetch %s" mm-url-arguments] 8 (#$ . 5181)]) #@55 The number of seconds before timing out an URL fetch. (defvar mm-url-timeout 30 (#$ . 5576)) #@62 The number of retries after timing out when fetching an URL. (defvar mm-url-retries 10 (#$ . 5675)) #@116 Insert the contents from an URL in the current buffer. If FOLLOW-REFRESH is non-nil, redirect refresh url in META. (defalias 'mm-url-insert #[(url &optional follow-refresh) "\306\307\306\310\fS\211!\204% \204% \311\312\215\211\311=\204! \210)\202 ,\207" [mm-url-retries result first done times -with-timeout-value- nil t zerop #1=#:timeout (byte-code "\306\307\310#\211\nB\311\216\204 \312\313\f Z\"\210\307\203H \214``}\210\314!\210eb\210\315\316\307\317#\203D \320\321!ed|\210\322\317\"))\202N \314!\317\211+\207" [mm-url-timeout -with-timeout-timer- with-timeout-timers first mm-url-retries times run-with-timer nil #[nil "\300\301\211\"\207" [throw #1#] 3] ((cancel-timer -with-timeout-timer-)) message "Trying again (%s)..." mm-url-insert-file-contents re-search-forward "<meta[ \n]*http-equiv=\"Refresh\"[^>]*URL=\\([^\"]+\\)\"" t match-string 1 mm-url-insert follow-refresh url result done] 5)] 5 (#$ . 5782)]) #@27 Decode all HTML entities. (defalias 'mm-url-decode-entities #[nil "eb\210\305\306\307\310#\205f \311\312!\211\313H\314=\203H \312H\315=\203) \316\317\307O\320\"\202/ \316\312\307O!\211\n\236A\2068 \321 !\203C \202D \314)\202R \322!\236A\206R \314\211;\204\\ \323\f!\324\f\310\211#\210*\202 \207" [entity c mm-extra-numeric-entities mm-url-html-entities elem re-search-forward "&\\(#[0-9]+\\|#x[0-9a-f]+\\|[a-z]+[0-9]*\\);" nil t match-string 1 0 35 120 string-to-number 2 16 mm-char-or-char-int-p intern char-to-string replace-match] 5 (#$ . 6741)]) #@49 Decode all HTML entities and to a space. (defalias 'mm-url-decode-entities-nbsp #[nil "\301B\302 )\207" [mm-url-html-entities (nbsp . 32) mm-url-decode-entities] 2 (#$ . 7310)]) (defalias 'mm-url-decode-entities-string #[(string) "\302\303!rq\210\304\216 c\210\305 \210\306 +\207" [#1=#:temp-buffer string generate-new-buffer " *temp*" ((byte-code "\301!\203\n \302!\210\301\207" [#1# buffer-name kill-buffer] 2)) mm-url-decode-entities buffer-string] 2]) #@171 Escape characters in a string for application/x-www-form-urlencoded. Blasphemous crap because someone didn't think %20 was good enough for encoding spaces. Die Die Die. (defalias 'mm-url-form-encode-xwfu #[(chunk) ":\203 A\302\303\304\305\306!\203 \306!@\202 \"\307#\207" [chunk buffer-file-coding-system mapconcat #[(char) "\302U\203 \303\207 >\203 \304!\207\305\306\"\226\207" [char mm-url-unreserved-chars 32 "+" char-to-string format "%%%02x"] 3] mm-encode-coding-string fboundp find-coding-systems-string ""] 6 (#$ . 7786)]) #@33 Return PAIRS encoded for forms. (defalias 'mm-url-encode-www-form-urlencoded #[(pairs) "\301\302\303#\207" [pairs mapconcat #[(data) "\301@!\302\301A!Q\207" [data mm-url-form-encode-xwfu "="] 4] "&"] 4 (#$ . 8338)]) (autoload 'mml-compute-boundary "mml") #@50 Remove all HTML markup, leaving just plain text. (defalias 'mm-url-remove-markup #[nil "eb\210\300\301\302\303#\203 \304\224\300\305\302\303#\206 d|\210\202 eb\210\306\307\302\303#\205/ \310\311\303\211#\210\202 \207" [search-forward "<!--" nil t 0 "-->" re-search-forward "<[^>]+>" replace-match ""] 5 (#$ . 8602)]) (provide 'mm-url)