%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/net/ |
Current File : //usr/local/share/emacs/27.2/lisp/net/shr.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; with all optimizations. ;;; This file contains utf-8 non-ASCII characters, ;;; and so cannot be loaded into Emacs 22 or earlier. (and (boundp 'emacs-version) (< (aref emacs-version (1- (length emacs-version))) ?A) (string-lessp emacs-version "23") (error "`%s' was compiled for Emacs 23 or later" #$)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\300\305!\210\300\306!\210\300\307!\210\300\310!\210\300\311!\210\312\313\314\315\316\317\320\321&\210\322\323\324\325\326DD\327\316\330\331\332&\210\322\333\324\325\334DD\335\316\330\331\336&\210\322\337\324\325\340DD\341\316\317\331\342&\210\322\343\324\325\344DD\345\316\346\331\342&\210\322\347\324\325\350DD\351\316\352\331\342&\210\322\353\324\325\354DD\355\331\356%\210\322\357\324\325\360DD\361\331\362%\210\322\363\324\325\364DD\365\331\362%\210\322\366\324\325\367DD\370\331\362%\210\322\371\324\325\372DD\373\316\317\331\374&\210\322\375\324\325\376DD\377\316\201@ \331\201A &\210\322\201B \324\325\201C DD\201D \331\201E \316\346&\210\201F \201G \201H \314#\210\201I \211\203\211@\201G N\203\201H N\204\201J \201H \201G N#\210A\266\202\202\362 \210\201K \201G \201H \346#\210\322\201L \324\325\201M DD\201N \316\201@ \331\342&\207" [require cl-lib browse-url dom seq svg image puny url-cookie text-property-search custom-declare-group shr nil "Simple HTML Renderer" :version "25.1" :group web custom-declare-variable shr-max-image-proportion funcall function #[0 "\300\207" [0.9] 1] "How big pictures displayed are in relation to the window they're in.\nA value of 0.7 means that they are allowed to take up 70% of the\nwidth and height of the window. If they are larger than this,\nand Emacs supports it, then the images will be rescaled down to\nfit these criteria." "24.1" :type float shr-blocked-images #[0 "\300\207" [nil] 1] "Images that have URLs matching this regexp will be blocked." (choice (const nil) regexp) shr-use-fonts #[0 "\300\207" [t] 1] "If non-nil, use proportional fonts for text." boolean shr-discard-aria-hidden #[0 "\300\207" [nil] 1] "If non-nil, don't render tags with `aria-hidden=\"true\"'.\nThis attribute is meant to tell screen readers to ignore a tag." "27.1" shr-use-colors #[0 "\300\207" [t] 1] "If non-nil, respect color specifications in the HTML." "26.1" shr-table-horizontal-line #[0 "\300\207" [nil] 1] "Character used to draw horizontal table lines.\nIf nil, don't draw horizontal table lines." (choice (const nil) character) shr-table-vertical-line #[0 "\300\207" [32] 1] "Character used to draw vertical table lines." character shr-table-corner #[0 "\300\207" [32] 1] "Character used to draw table corners." shr-hr-line #[0 "\300\207" [45] 1] "Character used to draw hr lines." shr-width #[0 "\300\207" [nil] 1] "Frame width to use for rendering.\nMay either be an integer specifying a fixed width in characters,\nor nil, meaning that the full width of the window should be used.\nIf `shr-use-fonts' is set, the mean character width is used to\ncompute the pixel width, which is used instead." (choice (integer :tag "Fixed width in characters") (const :tag "Use the width of the window" nil)) shr-bullet #[0 "\300\207" [#1="* "] 1 #1#] "Bullet used for unordered lists.\nAlternative suggestions are:\n- \" \"\n- \" \"" "24.4" string shr-cookie-policy #[0 "\300\207" [same-origin] 1] "When to use cookies when fetching dependent data like images.\nIf t, always use cookies. If nil, never use cookies. If\n`same-origin', use cookies if the dependent data comes from the\nsame domain as the main data." (choice (const :tag "Always use cookies" t) (const :tag "Never use cookies" nil) (const :tag "Use cookies for same domain" same-origin)) defvaralias shr-external-browser browse-url-secondary-browser-function (saved-value saved-variable-comment) put make-obsolete-variable shr-image-animate #[0 "\300\207" [t] 1] "Non-nil means that images that can be animated will be."] 8) #@157 If bound, this should be a function that will return the content. This is used for cid: URLs, and the function is called with the cid: URL as the argument. (defvar shr-content-function nil (#$ . 4028)) #@46 Function called to put image and alt string. (defvar shr-put-image-function 'shr-put-image (#$ . 4236)) (byte-code "\300\301\302\303\304\305%\210\300\306\307\310\304\305%\210\300\311\312\313\304\314%\210\300\315\316\317\304\314%\207" [custom-declare-face shr-strike-through ((t :strike-through t)) "Face for <s> elements." :version "24.1" shr-link ((t :inherit link)) "Face for link elements." shr-selected-link ((t :inherit shr-link :background "red")) "Temporary face for externally visited link elements.\nWhen a link is visited with an external browser, the link\ntemporarily blinks with this face." "27.1" shr-abbreviation ((t :inherit underline :underline (:style wave))) "Face for <abbr> elements."] 6) #@37 If non-nil, inhibit loading images. (defvar shr-inhibit-images nil (#$ . 4952)) #@208 Alist of tag/function pairs used to alter how shr renders certain tags. For instance, eww uses this to alter rendering of title, forms and other things: ((title . eww-tag-title) (form . eww-tag-form) ...) (defvar shr-external-rendering-functions nil (#$ . 5039)) (defvar shr-folding-mode nil) (defvar shr-start nil) (defvar shr-indentation 0) (defvar shr-internal-width nil) (defvar shr-list-mode nil) (defvar shr-content-cache nil) (defvar shr-kinsoku-shorten nil) (defvar shr-table-depth 0) (defvar shr-stylesheet nil) (defvar shr-base nil) (defvar shr-depth 0) (defvar shr-warning nil) (defvar shr-ignore-cache nil) (defvar shr-target-id nil) (defvar shr-table-separator-length 1) (defvar shr-table-separator-pixel-width 0) (defvar shr-table-id nil) (defvar shr-current-font nil) (defvar shr-internal-bullet nil) (defvar shr-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\325#\210\301\326\325#\210\301\327\317#\210\301\330\331#\210\301\332\317#\210\211\207" [make-sparse-keymap define-key "a" shr-show-alt-text "i" shr-browse-image "z" shr-zoom-image [9] shr-next-link [134217737] shr-previous-link [follow-link] mouse-face [mouse-2] shr-browse-url [C-down-mouse-1] shr-mouse-browse-url-new-window "I" shr-insert-image "w" shr-maybe-probe-and-copy-url "u" "v" "O" shr-save-contents " "] 5)) (defvar shr-image-map (byte-code "\302!\303\301!\203 \304 \"\210\211\207" [shr-map image-map copy-keymap boundp set-keymap-parent] 4)) #@64 Display the HTML rendering of the current buffer. (fn BUFFER) (defalias 'shr-render-buffer #[257 "\300\301!\204\n \302\303!\210\304\305!\210\306 \210\307rq\210\301ed\")!\210eb\207" [fboundp libxml-parse-html-region error "This function requires Emacs to be compiled with libxml2" pop-to-buffer "*html*" erase-buffer shr-insert-document] 5 (#$ . 6629) (byte-code "pC\207" [] 1)]) #@98 Display the HTML rendering of the region between BEGIN and END. (fn BEGIN END &optional BUFFER) (defalias 'shr-render-region #[770 "\300\301!\204\n \302\303!\210r\211\206 pq\210\301\"|\210b\210\304!\262)\207" [fboundp libxml-parse-html-region error "This function requires Emacs to be compiled with libxml2" shr-insert-document] 6 (#$ . 7016) "r"]) #@75 Return non-nil if we know at least one of the fringes has non-zero width. (defalias 'shr--have-one-fringe-p #[0 "\300\301!\205W \302\303\211\203 \304\202 \305\306=\203 \307\202 \310\311 !\206# \312\313\314 !\"\266\202\312U?\206W \306\303\211\203: \304\202; \305\306=\203E \307\202F \310\311 !\206M \312\313\314 !\"\266\202\312U?\207" [fboundp fringe-columns right nil / ceiling left car cadr window-fringes 0 float frame-char-width] 6 (#$ . 7380)]) #@149 Render the parsed document DOM into the current buffer. DOM should be a parse tree as generated by `libxml-parse-html-region' or similar. (fn DOM) (defalias 'shr-insert-document #[257 "\306`\306\211\307\211\306\310\311! \310 !B\n\203# \204 \n\202 \n\312 _\206Y \204= \313\314 \315\n\2048 \316 \2048 \307\2029 \315#\202Y \313\314\306\317\"\320\312 _\n\204V \316 \204V \312 \320_\202W \307\315$\f\306\321\306\307\"\210\322!\210\323`\"\210\324`\"\210\205\212 \325\326\".\n\207" [shr-content-cache shr-bullet shr-width shr-use-fonts max-specpdl-size bidi-display-reordering nil 0 shr-string-pixel-width "-" frame-char-width - window-body-width 1 shr--have-one-fringe-p t 2 set-window-hscroll shr-descend shr-fill-lines shr--remove-blank-lines-at-the-end message "%s" shr-internal-width shr-internal-bullet shr-table-separator-pixel-width shr-warning shr-table-id shr-depth shr-base shr-start] 14 (#$ . 7842)]) #@18 (fn START END) (defalias 'shr--remove-blank-lines-at-the-end #[514 "\214\212}\210\211b\210\300\301\302\303#\205 m?\205 \304y\210`d|*\207" [re-search-backward "[^ \n]" nil t 1] 6 (#$ . 8785)]) #@201 Return the URL under point as a string. If IMAGE-URL is non-nil, or there is no link under point, but there is an image under point then copy the URL of the image under point instead. (fn IMAGE-URL) (defalias 'shr-url-at-point #[257 "\211\203 \300`\301\"\207\300`\302\"\206 \300`\301\"\207" [get-text-property image-url shr-url] 4 (#$ . 8990)]) #@200 Copy the URL under point to the kill ring. With a prefix argument, or if there is no link under point, but there is an image under point then copy the URL of the image under point instead. (fn URL) (defalias 'shr-copy-url #[257 "\211\204 \300\301!\207\302!\262\303!\210\300\304\"\207" [message "No URL under point" url-encode-url kill-new "Copied %s"] 4 (#$ . 9345) (byte-code "\301!C\207" [current-prefix-arg shr-url-at-point] 2)]) #@199 Pass URL's redirect destination to CONT, if it has one. CONT should be a function of one argument, the redirect destination URL. If URL is not redirected, then CONT is never called. (fn URL CONT) (defalias 'shr-probe-url #[514 "\300\301\302\303\304\305!\306\"\307\310%\311\312\211%\207" [url-retrieve make-byte-code 257 "\211:\205&