%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/share/emacs/27.2/lisp/gnus/
Upload File :
Create Path :
Current File : //usr/local/share/emacs/27.2/lisp/gnus/mm-url.elc

;ELC
;;; Compiled
;;; in Emacs version 27.2
;;; 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\305\312\313\314\315\316\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 "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)
#@65 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)")) (#$ . 1604))
#@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) (#$ . 3528))
#@34 Load `url-insert-file-contents'.
(defalias 'mm-url-load-url #[nil "\3001\301\302!\210\301\303!\210\301\304!0\202\210\305?\205\301\306!\207" [(error) require url-handlers url-parse url-vars nil url] 2 (#$ . 3912)])
#@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	\312\225S\"!\210\202\313	!\210eb\210\314	!	\315 D\207\316 \210\317\320	!\212eb\210\321\322\317\323#\203E\324\325!\210\2026)
\f<\203R\314\f@!\f*\207" [mm-url-use-external url url-current-object buffer-file-name result name string-match "^file:/+" insert-file-contents substring 0 mm-url-insert-file-contents-external url-generic-parse-url buffer-size mm-url-load-url nil url-insert-file-contents re-search-forward "
 1000
 ?" t replace-match ""] 4 (#$ . 4138)])
#@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 (#$ . 4786)])
#@55 The number of seconds before timing out an URL fetch.
(defvar mm-url-timeout 30 (#$ . 5181))
#@62 The number of retries after timing out when fetching an URL.
(defvar mm-url-retries 10 (#$ . 5280))
#@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\fS\211\310U\204|\204|\3112m\312
\306\313#\211B\314\216\n\2043\315\316\fZ\"\210\306\203c\214``}\210\317!\210eb\210\320\321\306\307#\203_\322\323!ed|\210\324\307\"))\202h\317!\307\211+0\211\311=\204x\210)\202	,\207" [mm-url-retries result first done times mm-url-timeout nil t 0 #1=#:timeout run-with-timer #[nil "\300\301\211\"\207" [throw #1#] 3] #[nil "\301!\207" [-with-timeout-timer- cancel-timer] 2] message "Trying again (%s)..." mm-url-insert-file-contents re-search-forward "<meta[ 	
\n]*http-equiv=\"Refresh\"[^>]*URL=\\([^\"]+\\)\"" match-string 1 mm-url-insert -with-timeout-timer- with-timeout-timers follow-refresh url -with-timeout-value-] 5 (#$ . 5387)])
#@27 Decode all HTML entities.
(defalias 'mm-url-decode-entities #[nil "eb\210\305\306\307\310#\205h\311\312!\211\313H\314=\203J\312H\315=\203)\316\317\320\"\321\"\202/\316\317\312\"!\211\n\236A\206:\322	!\323	!\203E	\202F\314)\202T\324!\236A\206T\314\211;\204^\325\f!\326\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 substring 2 16 mm-ucs-to-char characterp intern char-to-string replace-match] 5 (#$ . 6292)])
#@49 Decode all HTML entities and &nbsp; to a space.
(defalias 'mm-url-decode-entities-nbsp #[nil "\301B\302 )\207" [mm-url-html-entities (nbsp . 32) mm-url-decode-entities] 2 (#$ . 6881)])
(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*" #[nil "\301!\205	\302!\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) ":\203A\205\301\302\303\304!@\"\305#\207" [chunk 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] encode-coding-string find-coding-systems-string ""] 6 (#$ . 7341)])
#@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 (#$ . 7841)])
(autoload 'mml-compute-boundary "mml")
#@360 Return DATA encoded in multipart/form-data.
DATA is a list where the elements can have the following form:
  ("NAME" . "VALUE")
  ("submit")
  ("file" . (("name" . "NAME")
             ("filename" . "FILENAME")
             ("content-type" . "CONTENT-TYPE")
             ("filedata" . "FILEDATA")))
Lowercase strings above are literals and uppercase are not.
(defalias 'mm-url-encode-multipart-form-data #[(data &optional boundary) "\204\306\307!\310\311!r	q\210\312\216\313\307!\210\n\307\211\203\234\f@\211@A\314\315\261\210\316\267\202\203\317\320\321\322
\"A\206A\321\323
\"A#c\210\324c\210\317\325\321\326
\"A\206W\327\"c\210\321\330
\"A\211;\203mc\210\202y\250\203y\331!c\210)\202\215\332c\210\202\215\317\333\"c\210
c\210n\204\224\315c\210*\fA\211\204*\314\334\261\210\335 +\207" [boundary #1=#:temp-buffer data elem --dolist-tail-- value mml-compute-boundary nil generate-new-buffer " *temp*" #[nil "\301!\205	\302!\207" [#1# buffer-name kill-buffer] 2] set-buffer-multibyte "--" "
\n" #s(hash-table size 2 test equal rehash-size 1.5 rehash-threshold 0.8125 purecopy t data ("file" 53 "submit" 125)) format "Content-Disposition: form-data; name=%S; filename=%S
\n" assoc "name" "filename" "Content-Transfer-Encoding: binary
\n" "Content-Type: %s
\n
\n" "content-type" "text/plain" "filedata" number-to-string "Content-Disposition: form-data; name=\"submit\"
\n
\nSubmit
\n" "Content-Disposition: form-data; name=%S
\n
\n" "--
\n" buffer-string name filedata] 7 (#$ . 8106)])
#@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#\206d|\210\202eb\210\306\307\302\303#\205/\310\311\303\211#\210\202\207" [search-forward "<!--" nil t 0 "-->" re-search-forward "<[^>]+>" replace-match ""] 5 (#$ . 9641)])
(provide 'mm-url)

Zerion Mini Shell 1.0