;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (put 'w3m-condition-case 'lisp-indent-function 2) #@103 Like `condition-case', except that signal an error if `debug-on-error' or `debug-on-quit' is non-nil. (defalias 'w3m-condition-case '(macro . #[(var bodyform &rest handlers) "\303\304\305 \nBBBF\207" [bodyform var handlers if (or debug-on-error debug-on-quit) condition-case] 7 (#$ . 138)])) #@128 Decode the string STR which is encoded in CODING. If CODING is a list, look for the coding system using it as a priority list. (defalias 'w3m-decode-coding-string-with-priority #[(str coding) "\305\306\307\"rq\210\310\216\311\312!\210 c\210\313\314 \n<\203\"\315ed\n#\202#\n\206/ \206/\f\206/\316\"+\207" [#1=#:temp-buffer str coding w3m-default-coding-system w3m-coding-system generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] set-buffer-multibyte nil decode-coding-string buffer-string w3m-detect-coding-region iso-2022-7bit] 6 (#$ . 439)]) #@66 Like `add-text-properties' but always add a non-sticky property. (defalias 'w3m-add-text-properties '(macro . #[(start end props &optional object) "\304 \305\306\nE \257\207" [start end props object add-text-properties append '(rear-nonsticky t)] 6 (#$ . 1041)])) #@348 Add face NAME to the face text property of the text from START to END. The value of the existing text property should be a list. If the optional fourth argument OBJECT is a buffer (or nil, which means the current buffer), START and END are buffer positions (integers or markers). If OBJECT is a string, START and END are 0-based indices into it. (defalias 'w3m-add-face-property #[(start end name &optional object) "\306\211\211\fW\205.\307 \310 #\311 \310 \f$\312 \n\313\314\310 BD\" $\210\n\211\202+\207" [start prop next pos end object nil get-text-property face next-single-property-change add-text-properties append (rear-nonsticky t) name] 9 (#$ . 1314)]) #@349 Remove face NAME from the face text property of text from START to END. The value of the existing text property should be a list. If the optional fourth argument OBJECT is a buffer (or nil, which means the current buffer), START and END are buffer positions (integers or markers). If OBJECT is a string, START and END are 0-based indices into it. (defalias 'w3m-remove-face-property #[(start end name &optional object) "\306\211\211\211\211W\205e\307 \310#\311 \310$ <\203<\312 \"\313\nGY\2038\n@\202H\n\202H \232\203G\306\202H \314 \f\310$\210\n\203_\315 \f\310\nD$\210\f\211\202 -\207" [start elem new-prop prop next pos nil get-text-property face next-single-property-change remove 1 remove-text-properties add-text-properties end object name] 6 (#$ . 1996)]) #@237 Search for the text property PROP in one character before and behind the current position. Return the value corresponding to PROP or nil. If PROP is not found at the current position, point will move to the position where PROP exists. (defalias 'w3m-get-text-property-around '(macro . #[(prop) "\301\302\303\304\305E\306\307\310\311\304\312EE\313BBB\306\314\310\311\304\315EE\316BBBFE\207" [prop let ((position (point)) value) or get-text-property position and (not (bolp)) setq value (1- position) ((goto-char (1- position)) value) (not (eolp)) (1+ position) ((goto-char (1+ position)) value)] 12 (#$ . 2803)])) #@249 Return the value of the `w3m-action' property at the given POSITION. NOTE: If POSITION is omitted, it searches for the property in one character before and behind the current position, and point will move to the position where the property exists. (defalias 'w3m-action '(macro . #[(&optional position) "\203\n\301\302BB\207\303\207" [position get-text-property ('w3m-action) (w3m-get-text-property-around 'w3m-action)] 3 (#$ . 3427)])) #@254 Return the value of the `w3m-href-anchor' property at the given POSITION. NOTE: If POSITION is omitted, it searches for the property in one character before and behind the current position, and point will move to the position where the property exists. (defalias 'w3m-anchor '(macro . #[(&optional position) "\203\n\301\302BB\207\303\207" [position get-text-property ('w3m-href-anchor) (w3m-get-text-property-around 'w3m-href-anchor)] 3 (#$ . 3874)])) #@248 Return the value of the `w3m-image' property at the given POSITION. NOTE: If POSITION is omitted, it searches for the property in one character before and behind the current position, and point will move to the position where the property exists. (defalias 'w3m-image '(macro . #[(&optional position) "\203\n\301\302BB\207\303\207" [position get-text-property ('w3m-image) (w3m-get-text-property-around 'w3m-image)] 3 (#$ . 4336)])) #@252 Return the value of the `w3m-image-alt' property at the given POSITION. NOTE: If POSITION is omitted, it searches for the property in one character before and behind the current position, and point will move to the position where the property exists. (defalias 'w3m-image-alt '(macro . #[(&optional position) "\203\n\301\302BB\207\303\207" [position get-text-property ('w3m-image-alt) (w3m-get-text-property-around 'w3m-image-alt)] 3 (#$ . 4779)])) #@255 Return the value of the `w3m-anchor-title' property at the given POSITION. NOTE: If POSITION is omitted, it searches for the property in one character before and behind the current position, and point will move to the position where the property exists. (defalias 'w3m-anchor-title '(macro . #[(&optional position) "\203\n\301\302BB\207\303\207" [position get-text-property ('w3m-anchor-title) (w3m-get-text-property-around 'w3m-anchor-title)] 3 (#$ . 5238)])) #@249 Return the value of the `w3m-submit' property at the given POSITION. NOTE: If POSITION is omitted, it searches for the property in one character before and behind the current position, and point will move to the position where the property exists. (defalias 'w3m-submit '(macro . #[(&optional position) "\203\n\301\302BB\207\303\207" [position get-text-property ('w3m-submit) (w3m-get-text-property-around 'w3m-submit)] 3 (#$ . 5709)])) #@126 Return the value of the `w3m-anchor-sequence' property at POSITION. If POSITION is omitted, the current position is assumed. (defalias 'w3m-anchor-sequence '(macro . #[(&optional position) "\203\n\301\302BB\207\303\207" [position get-text-property ('w3m-anchor-sequence) (get-text-property (point) 'w3m-anchor-sequence)] 3 (#$ . 6156)])) #@68 Regexp matching a string of the field-value like . (defconst w3m-html-string-regexp "\\(\"\\([^\"]+\\)\"\\|'\\([^']+\\)'\\|[^\"'<> \f\n]*\\)" (#$ . 6503)) (byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put w3m-parse-attributes lisp-indent-function 1 edebug-form-spec ((&rest &or (symbolp &optional symbolp) symbolp) body)] 4) #@698 Extract ATTRIBUTES, KEYWORD="VALUE" pairs, in a tag and run FORMS. ATTRIBUTES is a list of symbols that looks like `(KEYWORD KEYWORD...)'. A symbol KEYWORD, that will express a value extracted from a tag, can be used as a Lisp variable within FORMS. The point has to be within a tag initially, and only attributes that follow the point will be extracted. The value of KEYWORD is a string by default, or is nil if the KEYWORD is not found in a tag. KEYWORD can be `(KEYWORD TYPE)', where TYPE is one of `:case-ignore', `:integer', `:bool', and `:decode-entity'. Those types mean converting the value into a lower-case string, an integer, a boolean (t or nil), and a decoded string respectively. (defalias 'w3m-parse-attributes '(macro . #[(attributes &rest forms) "\303\304\305\"\306\307\310\311\304\312\"\313\314 PDC\315B\"B\316BB\317\320\nBBBBBB\207" [attributes w3m-html-string-regexp forms let mapcar #[(attr) "<\203@\207\207" [attr] 1] (skip-chars-forward " \f\n") while cond append #[(attr) "9\204<\203G\304X\203@9\204\305\306!\210\307\310<\203UA@\211\311\267\202H\312\nD\202R\313\nD\202R\314\202R\315\nD\202RA@\203R\305\316!\210@\317 \320=\203f\321\322\323! #\202m\321\324\323! #D\325\nE*D\207" [attr type sexp w3m-html-string-regexp 2 error "Internal error, type mismatch" (w3m-remove-redundant-spaces (or (match-string-no-properties 2) (match-string-no-properties 3) (match-string-no-properties 1))) nil #s(hash-table size 4 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (:case-ignore 46 :integer 53 :bool 60 :decode-entity 65)) downcase string-to-number t w3m-decode-entities-string "Internal error, unknown modifier" looking-at :bool format "%s\\(?:[ \f\n]*=[ \f\n]*%s\\)?" symbol-name "%s[ \f\n]*=[ \f\n]*%s" setq] 6] looking-at "[A-Za-z]*[ \f\n]*=[ \f\n]*" (((looking-at "[^<> \f\n]+"))) ((goto-char (match-end 0)) (skip-chars-forward " \f\n")) (skip-chars-forward "^>") (forward-char)] 10 (#$ . 6864)])) #@70 Return the buffer named NAME, or create such a buffer and return it. (defalias 'w3m-get-buffer-create #[(name) "\303!\206\304!\211\nB\305 !\210 )\207" [name buf w3m-work-buffer-list get-buffer get-buffer-create buffer-disable-undo] 3 (#$ . 8869)]) #@178 Kill the buffer BUFFER and remove it from `w3m-work-buffer-list'. The argument may be a buffer or may be the name of a buffer. An argument of nil means kill the current buffer. (defalias 'w3m-kill-buffer #[(buffer) "\204p;\203\302!\303!\203\304!\210\305 \"\306\207" [buffer w3m-work-buffer-list get-buffer buffer-live-p kill-buffer delq nil] 3 (#$ . 9130)]) #@26 Kill all working buffer. (defalias 'w3m-kill-all-buffer #[nil "\303\211\203\n@\304 !\203\305 !\210\nA\211\204*\303\211\207" [w3m-work-buffer-list buf --dolist-tail-- nil buffer-live-p kill-buffer] 3 (#$ . 9509)]) #@41 Return the title of the current buffer. (defalias 'w3m-current-title #[nil "\203\303\207 ;\203 \304\230\204 \207\n;\203+\305\306\307\n\"\203(\n\310\225\311O\202)\n!\207\304\207" [w3m-current-process w3m-current-title w3m-current-url "" "" directory-file-name string-match "\\`[^/:]+:/+" 0 nil] 4 (#$ . 9740)]) #@40 Return the title of the buffer BUFFER. (defalias 'w3m-buffer-title #[(buffer) "rq\210\301 )\207" [buffer w3m-current-title] 1 (#$ . 10088)]) (defalias 'w3m-buffer-number #[(buffer) "\301!\205\302\303\304!\"\205\305\224\203\306\307\310\304!\"!\207\305\207" [buffer bufferp string-match "\\*w3m\\*\\(<\\([0-9]+\\)>\\)?\\'" buffer-name 1 string-to-number match-string 2] 5]) (defalias 'w3m-buffer-set-number #[(buffer number) "rq\210 \203\n\304U\203\305\306\307 \"\202-\305\310\307 \n#\202-\n\304U\203)\311\202-\305\312\n\"\313!\n=\203G \205Q\314 !?\205Q\315 !\202Q\314 !?\205Q\315 !*\207" [buffer w3m-use-title-buffer-name number newname 1 format "%s *w3m*" w3m-current-title "%s *w3m*<%d>" "*w3m*" "*w3m*<%d>" w3m-buffer-number get-buffer rename-buffer] 4]) #@34 Add current tile to buffer name. (defalias 'w3m-buffer-name-add-title #[nil "\205$\303p!\304\211\305U\203\306\307\310 \"\202 \306\311\310 \n#\312 !*\207" [w3m-use-title-buffer-name newname number w3m-buffer-number nil 1 format "%s *w3m*" w3m-current-title "%s *w3m*<%d>" rename-buffer] 5 (#$ . 10877)]) #@126 Create and return a buffer with a name based on NAME. Make the new buffer the next of the current buffer if NEXT is non-nil. (defalias 'w3m-generate-new-buffer #[(name &optional next) "\306\307\"\203 \310\311\224O\312\313 \211GT\f\203 p\n>\202#\314\n!\312\211 \203`\315 @!\2066\311Tp A\237\312\211\203_@\316 \"\210 SA\211\204H*r\317\203p\320\321#\202q!\211q\210\322 \210).\207" [name w3m-fb-mode all num next tail string-match "\\*w3m\\*\\(<\\([0-9]+\\)>\\)\\'" 0 1 nil w3m-list-buffers last w3m-buffer-number w3m-buffer-set-number generate-new-buffer format "%s<%d>" w3m-mode new prev buf --dolist-tail-- w3m-previous-session-buffer] 6 (#$ . 11196)]) #@58 Return t if first arg buffer's name is less than second. (defalias 'w3m-buffer-name-lessp #[(x y) "\302!\203\n\303!\302 !\203\303 !\304\305\"\203P\306\224\203*\307\310\311\"!\202+\312B\211\203P\304\305 \"\203KA\306\224\203H\307\310\311 \"!\202I\312W\207@ \231\207 \231\207" [x y bufferp buffer-name string-match "\\*w3m\\*\\(<\\([0-9]+\\)>\\)?\\'" 1 string-to-number match-string 2 0] 5 (#$ . 11908)]) #@144 Return a list of buffers in which emacs-w3m sessions are open. If the optional NOSORT is nil, the list is sorted in the order of buffer names. (defalias 'w3m-list-buffers #[(&optional nosort) "\306 \307\211r\n\203\"\n\211A\242\211q\210 \310=\203 B\202)\f\203,\237\2020\311\312\"\313\305!\203t \203t\204G\314>\204M\307\211\202N\315\203t\316\317\"\n\203s\211A\242\211>\204Z\320 \n\"\202Z)\n+\207" [rest buffer buffers major-mode nosort w3m-fb-mode buffer-list nil w3m-mode sort w3m-buffer-name-lessp boundp w3m-fb-add t frame-parameter w3m-fb-buffer-list delq w3m-pop-up-frames w3m-mode-hook w3m-fb-list-buffers-frame fbs] 3 (#$ . 12338)]) #@71 Return non-nil if `w3m-pop-up-frames' is non-nil and it is effective. (defalias 'w3m-popup-frame-p '(macro . #[nil "\300\207" [(and w3m-pop-up-frames (display-graphic-p))] 1 (#$ . 13025)])) (defalias 'w3m-lefttab-exist-p #[(&optional buffer) "\206p\301 @=?\207" [buffer w3m-list-buffers] 2]) (defalias 'w3m-righttab-exist-p #[(&optional buffer) "\304 \206p\305\3062( @\211\205' A\n =\203\307\306 \"\210\2020+\207" [buffer buf cbuf bufs w3m-list-buffers nil exist throw] 3]) #@88 Return non-nil if `w3m-pop-up-windows' is non-nil and the present situation allows it. (defalias 'w3m-popup-window-p '(macro . #[nil "\300\207" [(and w3m-pop-up-windows (not (get-buffer-window w3m-select-buffer-name)))] 1 (#$ . 13522)])) #@208 Variable used to keep a list of the frame-IDs when emacs-w3m sessions are popped-up as new frames. This variable is used for the control for not deleting frames made for aims other than emacs-w3m sessions. (defvar w3m-initial-frames nil (#$ . 13767)) (make-variable-buffer-local 'w3m-initial-frames) #@75 Pop up BUFFER as a new window or a new frame, per the `w3m-display-mode'. (defalias 'w3m-popup-buffer #[(buffer) "\306\307\"\310\211\211\211\211\211\211\311 =?\205\341\312 \205&\313 \2039\314!\211=?\202\204F\306\307\"\203~\315\316\307!\"\204f\n\203f\306\n\211A\242\211\307\"\211\203R\203x\314!\211=?\202\310 \202 \211\203\277 \203\231\317 !\210\320!\321!\210\202\271\f\203\244\317!\210\202\271\206\253\317!\210)\314\306\307\"!\322\f!\202\341\203\326\306!\204\326\323!\210\202\332\321!\210)\324 .\207" [buffer other buffers pop-up-frames frame popup-frame-p get-buffer-window t nil selected-window selected-frame display-graphic-p window-frame delq w3m-list-buffers pop-to-buffer copy-sequence switch-to-buffer select-frame-set-input-focus switch-to-buffer-other-window w3m-history-restore-position oframe window w3m-pop-up-frames w3m-use-tab w3m-select-buffer-name w3m-initial-frames w3m-popup-frame-parameters pop-up-frame-alist default-directory cd w3m-pop-up-windows] 8 (#$ . 14074)]) #@197 Add FRAME to `w3m-initial-frames', the buffer-local variable. It is done when FRAME is newly created for the emacs-w3m session. This function will be added to `after-make-frame-functions' to run. (defalias 'w3m-add-w3m-initial-frames #[(&optional frame) "\204\306 r\307\310!!q\210 \311=\205I\n>\204\nB \205I\312p\313\314!\"\315\211\205H @\211q\210\n>\204@\nB A\211\2040\315*)\207" [frame major-mode w3m-initial-frames w3m-use-tab buffer --dolist-tail-- selected-frame window-buffer frame-first-window w3m-mode delq w3m-list-buffers t nil] 5 (#$ . 15167)]) (add-hook 'after-make-frame-functions 'w3m-add-w3m-initial-frames) #@249 Delete FRAME from `w3m-initial-frames', the buffer-local variable. It is done when the FRAME in which emacs-w3m is running is deleted. This function is added to `delete-frame-functions' or merged into the `delete-frame' function using `defadvice'. (defalias 'w3m-delete-w3m-initial-frames #[(frame) "r\304\305!\306\211\205 @\211q\210\307\n \" A\211\204 \306+\207" [buffer --dolist-tail-- frame w3m-initial-frames w3m-list-buffers t nil delq] 4 (#$ . 15819)]) (add-hook 'delete-frame-functions 'w3m-delete-w3m-initial-frames) #@387 Delete all frames and windows related to emacs-w3m buffers. If EXCEPTION is a buffer, a window or a frame, it and related visible objects will not be deleted. There are special cases; the following objects will not be deleted: 1. The sole frame in the display device. 2. Frames created not for emacs-w3m sessions. 3. Frames showing not only emacs-w3m sessions but also other windows. (defalias 'w3m-delete-frames-and-windows #[(&optional exception) "\306\307\310!\"\311\211\211\211\211\211r\205\222\211A\242\306\312\313\310#\"q\210 \203 \211A\242\314\f!\205E\315\f!\211\2032 =\2042\311\3162^\317\320\313\310#\210 0\310\317\321\313\"\210q\210 \204r\n\2032 >\2032\322 ! =\2042\306\323\324!\"\325 !\210)\2022.\207" [exception flag one-window-p frame window windows delq w3m-list-buffers t nil get-buffer-window-list no-minibuf window-live-p window-frame two walk-windows #[(w) "\303! =\205\n\203\304\305\306\"\207\307\211\207" [w frame flag window-frame throw two nil t] 3] #[(w) "\2052 \n=\203\304\211\207\305 !q\210 \306>\206\307\310\311 \"\211\2052\312 \313\" =\203/\314 \207\315 !\207" [flag w exception major-mode nil window-buffer (w3m-mode w3m-select-buffer-mode w3m-session-select-mode) string-match "\\` ?\\*w3m[ -]" buffer-name next-window no-minibuf bury-buffer delete-window] 3] next-frame w3m-fb-delete-frame-buffers copy-sequence delete-frame buffer buffers w3m-initial-frames delete-frame-functions] 8 (#$ . 16359)]) #@149 Create function w3m-goto-next- NAME. Return position of the first occurence of PROPERTY. If currently over such PROPERTY, find next such occurence. (defalias 'w3m-goto-next-defun '(macro . #[(name property) "\302\303\304\305!P!\306\307\305!\310Q\311\312\313\314\315 DE\316\314\317\314\315 DEEE\312\320\313\314\315 DE\316\314\317\314\315 DEEE\321BB\257\207" [name property defun intern "w3m-goto-next-" symbol-name (&optional pos) "Return position of next " " starting from POS or point." (setq pos (or pos (point))) if get-char-property pos quote setq next-single-property-change or (pos)] 15 (#$ . 17865)])) #@58 Return position of next link starting from POS or point. (defalias 'w3m-goto-next-link #[(&optional pos) "\206`\301\302\"\203\303\302\"\301\302\"\204\"\303\302\"\211\205#\207" [pos get-char-property w3m-href-anchor next-single-property-change] 3 (#$ . 18483)]) #@60 Return position of next image2 starting from POS or point. (defalias 'w3m-goto-next-image2 #[(&optional pos) "\206`\301\302\"\203\303\302\"\301\302\"\204\"\303\302\"\211\205#\207" [pos get-char-property w3m-image next-single-property-change] 3 (#$ . 18765)]) #@69 Return position of next anchor or image starting from POS or point. (defalias 'w3m-goto-next-anchor-or-image #[(&optional pos) "\206`\303\304\"\203\305\304\"\202!\303\306\"\203!\305\306\"\303\304\"\204J\303\306\"\204J\305\306\"\305\304\" \203I\203G V\203I )\205h\303\304\"\211\203f\307e\304\n$\203f\310!\202g)\207" [pos image-pos hseq get-text-property w3m-anchor-sequence next-single-property-change w3m-image text-property-any w3m-goto-next-anchor-or-image] 6 (#$ . 19045)]) #@134 A url base used to make url absolutely invalid. `w3m-expand-url' will use it as a last resort if no other appropriate base is given. (defconst w3m-url-invalid-base "http:///" (#$ . 19567)) #@260 Return URL if it is not marked invalid, otherwise nil. This function is intended only to reject a url that `w3m-expand-url' marks invalid purposely (using `w3m-url-invalid-base'), does not necessarily guarantee that URL to return is valid in a general sense. (defalias 'w3m-url-valid #[(url) "\205 \301\302\"?\205 \207" [url string-match "\\`http:///"] 3 (#$ . 19763)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put w3m-url-valid speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@87 In NEW-MAP substitute cascade of OLD-MAP KEYS. KEYS is alternating list of key-value. (defalias 'w3m-substitute-key-definitions '(macro . #[(new-map old-map &rest keys) " \306\307 \203 \310 @ A@ \n\257\fB AA\211\204 \f\237+B\207" [new-map old-map o-map n-map res keys progn nil substitute-key-definition] 7 (#$ . 20283)])) #@38 Subroutine used by `w3m-search-tag'. (defalias 'w3m-search-tag-1 #[(regexp) "`\304\211\305 \304\306#\203\201\307\224\307\225\211\203\201\310\311!\204,\310\312!\203\201\313\314\304\306#\203\201\307\225b\315\307\224U\203A \307\225 TF\202|\307\224\206G`Sf\316=\203p\307\224SU\203` \307\225 TF\202| \307\225 T\211\307\225\317Z\257\202| \307\225 T\211\307\225S\257!\210\202\211\315\304!\210\nb\210\304+\207" [end begin start regexp nil re-search-forward t 0 looking-at "/?>" "[ \f\n]" search-forward ">" set-match-data 47 2] 9 (#$ . 20621)]) #@342 Search forward for a tag which begins with one of NAMES. This macro generates the form equivalent to: (re-search-forward "<\\(NAMES\\)\\([ \t\f\n]+[^>]*\\)?/?>" nil t) but it works even if the tag is considerably large. Note: this macro allows only strings for NAMES, that is, a form something like `(if foo "bar" "baz")' cannot be used. (defalias 'w3m-search-tag '(macro . #[(&rest names) "\301\302\303\304\"PD\207" [names w3m-search-tag-1 "<" regexp-opt t] 5 (#$ . 21192)])) #@1333 Move point to the beginning of tag. Inner nested tags are skipped. If TAG, which is a name of the tag, is given, this function moves point backward from the closing-tag (point has to exist after or within it initially) to the beginning point of the open-tag . For example, in the following two situations, point moves backward from the rightmost tag to the beginning point of the leftmost tag: ............... ............... If TAG is omitted or nil, this function moves point backward to the beginning point of the tag in which point exists. In this case, point has to initially exist between the end position of the closing-tag and the previous tag as follows: ^^^ If INCLUDE-WHITESPACE is non-nil, include leading and trailing whitespace. Return the end-point and set the match-data #0, #1, #2, and #3 as follows ("___" shows whitespace): The case where TAG is spefified: ______...______ 0 1 2 2 1 0 INCLUDE-WHITESPACE=nil 0 1 2 3 3 2 1 0 INCLUDE-WHITESPACE=non-nil The case where TAG is nil: ______ 0 0 INCLUDE-WHITESPACE=nil 0 1 1 0 INCLUDE-WHITESPACE=non-nil (defalias 'w3m-beginning-of-tag #[(&optional tag include-whitespace) "`\306\307 \310\311\211\211\211\211\211\211\211\211\211 !\"#$\3121h%\203\334` \313%!%\314\315%\316Q\311\310#\203e \317\225=\203e\320\307 8\321\307 8\322\311x\210\323  b\210\202\233 b\210\324\325!\210` \314\326%\327Q!\203\227 \317\225=\203\227\307 A@\307 @\322\311x\210\323 \202\233\330\331!\210Sb\210\332%\316Q#\317V\203\311\314!\203\311\321\224\203\300#T\202\303#S\211#\202\251\307 @\320\307 8 \307 A@^\202\324\325!\210\307 A@$b\210#\317V\203 \314\333!\203 \306\224\203#S\202#T\211#\202\354\321\307 8&\203J\322\311x\210\323 b\210\322\311w\210\323  b\210\334%\203? \f \n \257\202E \fF!\210\202c\334%\203]\f \n \257\202a\fD!\210`0\202s\210\334\"!\210$b\210\311.\207" [nd0 st0 st3 st2 st1 nd3 1 match-data t nil (error) regexp-quote re-search-backward "\\(<[ \n ]*/[ \n ]*" "\\(?:[ \n ]*\\|[ \n ]+[^>]+\\)>\\)[ \n ]*" 0 3 2 " \n " point-marker search-forward ">" "<[ \n ]*/[ \n ]*" "\\(?:[ \n ]*\\|[ \n ]+[^>]+\\)>" error "" "\\(<\\([ \n ]*/\\)?[ \n ]*" "\\(<\\)\\|>" set-match-data nd2 nd1 regexp end case-fold-search md num init tag include-whitespace] 15 (#$ . 21681)]) #@1258 Move point to the end of tag. Inner nested tags are skipped. If TAG, which is a name of the tag, is given, this function moves point from the open-tag (point has to exist in front of or within it initially) to the end point of the closing-tag . For example, in the following two situations, point moves from the leftmost tag to the end point of the rightmost tag: ............... ............... If TAG is omitted or nil, this function moves point to the end point of the tag in which point exists. In this case, point has to initially exist between the beginning position of the tag and the next tag as follows: ^^^^^^^^ If INCLUDE-WHITESPACE is non-nil, include leading and trailing whitespace. Return the end-point and set the match-data #0, #1, #2, and #3 as follows ("___" shows whitespace): The case where TAG is spefified: ______...______ 0 1 2 2 1 0 INCLUDE-WHITESPACE=nil 0 1 2 3 3 2 1 0 INCLUDE-WHITESPACE=non-nil The case where TAG is nil: ______ 0 0 INCLUDE-WHITESPACE=nil 0 1 1 0 INCLUDE-WHITESPACE=non-nil (defalias 'w3m-end-of-tag #[(&optional tag include-whitespace) "`\306\307 \310\311\211\211\211\211\211\211\211\211 !\"#$\3121@%\203\265\313%!%\314\315%\316Q!\203O\317\307 8\320\307 8\307 A@\202t\321\322!\210\314\323%\316Q!\203p\307 @\320\307 8\307 A@\202t\324\325!\210Tb\210\326%\327Q #\330V\203\242\331 !\203\242\317\224\203\231#S\202\234#T\211#\202\202\320\307 8\317\307 8 \307 @]\202\350\321\322!\210\307 @$b\210#\330V\203\343\331\332!\203\343\306\224\203\332#S\202\335#T\211#\202\304\320\307 8&\203\"\333\311w\210\334 b\210\333\311x\210\334  b\210\335%\203 \f \n\257\202 \fF!\210\202;\335%\2035\f \n\257\2029\fD!\210`0\202K\210\335\"!\210$b\210\311. \207" [st0 nd0 nd3 nd2 nd1 st3 1 match-data t nil (error) regexp-quote looking-at "[ \n ]*\\(<[ \n ]*" "\\(?:[ \n ]*\\|[ \n ]+[^>]+\\)>\\)[ \n ]*" 2 3 search-backward "<" "\\(<[ \n ]*" error "" "[ \n ]*\\(<\\([ \n ]*/\\)?[ \n ]*" "\\(?:[ \n ]*\\|[ \n ]+[^>]+\\)>\\)" 0 re-search-forward "\\(>\\)\\|<" " \n " point-marker set-match-data st2 st1 regexp case-fold-search md num init tag include-whitespace] 14 (#$ . 24288)]) #@65 A last resort run when `w3m-string-match-url-components' fails. (defalias 'w3m-string-match-url-components-1 #[(string) "\304\305\306\"\306\307\310\311\"r\nq\210\312\216\313\314 !!\210 c\210eb\210 \315\211I\210 \316dSI\210\317\320!\203K \321\315I\210 \322\315I\210\315\225b\210 \323`S\211I\210 \324SI\210\317\325!\203q \326`SI\210\321u\210 \327`SI\210\330\306w\210 \331`S\211I\210 \332I\210 \333`SI\210\334\306w\210 \335`S\211I\210\306f\336=\203\251 \337I\210\316u\210 \340`SI\210\341\306w\210 \342`S\211I\210 \343I\210m\204\315`Tf\344=\204\315 \345`SI\210 \346`I\210 \347dS\211I\210 \350I\210+\351\352 \306\"!\210*\315\207" [pt md #1=#:temp-buffer string make-vector 20 nil generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1# buffer-name kill-buffer] 2] set-buffer-multibyte multibyte-string-p 0 1 looking-at "[^:/?#]+:" 2 4 3 5 "//" 6 8 "^/?#" 7 9 10 "^?#" 11 63 12 14 "^#" 13 15 47 16 18 17 19 set-match-data append] 4 (#$ . 26742)]) #@165 Regexp used for parsing a URI Reference. It matches the potential four components and fragment identifier of a URI reference. See RFC2396, Appendix B for details. (defconst w3m-url-components-regexp "\\`\\(\\([^:/?#]+\\):\\)?\\(//\\([^/?#]*\\)\\)?\\([^?#]*\\)\\(\\?\\([^#]*\\)\\)?\\(#\\(.*\\)\\)?\\'" (#$ . 27720)) #@140 Do the same thing as `(string-match w3m-url-components-regexp STRING)'. But this function should work even if STRING is considerably long. (defalias 'w3m-string-match-url-components #[(string) "\3021(\303 \"\304\224\203&\304\224\304\225W\203& \304\224H\305=\203&\306\307\310 \311\"!\2100\207\210\312 !\207" [w3m-url-components-regexp string (error) string-match 9 47 set-match-data nbutlast match-data 4 w3m-string-match-url-components-1] 5 (#$ . 28043)]) (byte-code "\300\301\302\303#\304\301\305\306#\207" [function-put w3m-string-match-url-components speed -1 put byte-optimizer byte-compile-inline-expand] 5) #@164 Return t, if A is newer than B. Otherwise return nil. A and B are lists which represent time in Emacs-style. If value is nil, it is regarded as the oldest time. (defalias 'w3m-time-newer-p #[(a b) "\205 ?\206 @ @V\206 @ @U\205 A@ A@V\207" [a b] 2 (#$ . 28668)]) #@102 Return lapse seconds from START to END. START and END are lists which represent time in Emacs-style. (defalias 'w3m-time-lapse-seconds #[(start end) "@ @Z\302_A@\\ A@[\\\207" [end start 65536] 2 (#$ . 28948)]) #@87 If URL points a file on the local system, return non-nil value. Otherwise return nil. (defalias 'w3m-url-local-p #[(url) "\301\302\"\205\n\303!\207" [url string-match "\\`file:" w3m-url-to-file-name] 3 (#$ . 29166)]) #@75 Regular expression for parsing the authentication part of a URI reference (defconst w3m-url-authinfo-regexp "\\`\\([^:/?#]+:\\)?//\\([^/?#:]+\\)\\(?::\\([^/?#@]+\\)\\)?@" (#$ . 29392)) #@56 Return a user name and a password to authenticate URL. (defalias 'w3m-url-authinfo #[(url) "\302 \"\205\303\304 \"\303\305 \"B\207" [w3m-url-authinfo-regexp url string-match match-string 2 3] 4 (#$ . 29583)]) #@46 Remove the authentication part from the URL. (defalias 'w3m-url-strip-authinfo #[(url) "\302 \"\203\303\304 \"\305 \306\225\307OQ\207 \207" [w3m-url-authinfo-regexp url string-match match-string 1 "//" 0 nil] 5 (#$ . 29801)]) #@46 Remove the fragment identifier from the URL. (defalias 'w3m-url-strip-fragment #[(url) "\301\302\"\203\303\224\204\304\305\"\207\207" [url string-match "\\`\\([^#]*\\)#\\(/\\)?" 2 match-string 1] 3 (#$ . 30036)]) #@65 Remove the query part and the fragment identifier from the URL. (defalias 'w3m-url-strip-query #[(url) "\301\302\"\203\f\303\304\"\207\207" [url string-match "\\`\\([^?#]*\\)[?#]" match-string 1] 3 (#$ . 30262)]) #@213 Returns an ALIST of queries in URL. ie. For anything after the first '?', for each segment until the next '&' or end-of-string, a CONS whose CAR is what is to the left of '=' and whose CDR is to the right of it. (defalias 'w3m--url-get-queries #[(url) "\305\306\"\205 \307\310\"\311\211\211\211\203E\312\f\313\314# \211A\242\211\203E\305\315\n\"\203<\307\310\n\"\307\316\n\"B B\202\n\317B B\202 ,\207" [url result query split parameters string-match "[^?]+\\?\\(.*\\)$" match-string 1 nil split-string "&" omit-nulls "\\([^=]+\\)=\\(.*\\)$" 2 ""] 5 (#$ . 30486)]) (byte-code "\300\301\302\303\304\305\306\307&\210\300\310\311\312\304\305\306\313&\210\300\314\315\316\304\305\306\307&\207" [custom-declare-variable w3m-strip-queries t "Remove unwanted queries from URLs.\nDetails are set by `w3m-strip-queries-alist'." :group w3m :type boolean w3m-strip-queries-alist '(("\\`https?://.*" "&?utm_source=[^&]+") ("\\`https?://.*" "&?utm_medium=[^&]+") ("\\`https?://.*" "&?utm_campaign=[^&]+")) "Alist of url regexes and query regexes to strip from them.\nThis is meant to remove unwanted trackers or other data that websites or\nreferers embed." (repeat (group :format "%v" :indent 7 (string :tag "URL regex") (string :tag "Query regex"))) w3m-queries-log nil "Whether to log URL queries to `w3m-queries-log-file'."] 8) #@156 Strip unwanted queries from a url. This is meant to remove unwanted trackers or other data that websites or referers embed. See `w3m-strip-queries-alist'. (defalias 'w3m--url-strip-unwanted-queries #[(url) "\203 \306\307 \"\204 \207\310\311 \"\312\313\314\211 \311%\f\203* \203*\315\316\317 #!\210\320\211\203a@\306@\n\"\203X\306A@ \"\203X\312\313\314\211 \311%\202CA\211\2045* \211\313\230\262\203r\n\311\321O\202u\n P*\207" [w3m-strip-queries url base queries w3m-queries-log w3m-queries-log-file string-match "\\`.*\\?" match-string 0 replace-match "" t shell-command format "printf \"%s\n\" >> %s" nil -1 w3m-strip-queries-alist strip --dolist-tail--] 7 (#$ . 31833)]) #@33 Extract a server root from URL. (defalias 'w3m-get-server-hostname #[(url) "\301\302\"\203 \303\225\304O\305!\301\306\"\203\307\310\"\227\207\207" [url string-match "\\`about://[^/?#]+/" 0 nil w3m-url-strip-authinfo "\\`[^:/?#]+://\\([^/?#]+\\)" match-string 1] 3 (#$ . 32548)]) (defalias 'w3m-which-command #[(command) ";\205X\305!\203\306!\203\207\307!\3102X\311\n\311\211\205V\f@\312 \"\306 !\2039\313 !\203I\306 \314P\211!\203N\313 !\204N\315\310 \"\210\fA\211\204%\311+0\207" [command bin exec-path dir --dolist-tail-- file-name-absolute-p file-executable-p file-name-nondirectory found-command nil expand-file-name file-directory-p ".exe" throw] 4]) #@77 Run `cancel-timer' for TIMER iff it is really active. Return t if canceled. (defalias 'w3m-cancel-timer #[(timer) "\303!\205$\211\303!\206\304\305\303D\"\266\306 \"\306\n\"\307\266\310\207" [timer timer-list timer-idle-list timerp signal wrong-type-argument delq nil t] 6 (#$ . 33247)]) #@53 Cancel the timer for REFRESH attribute in META tag. (defalias 'w3m-cancel-refresh-timer #[(&optional buffer) "\205r \206\npq\210\304 \205\305 !\210\304\211)\207" [w3m-use-refresh buffer w3m-current-refresh w3m-refresh-timer nil cancel-timer] 2 (#$ . 33553)]) #@70 Return the element of ALIST whose car equals NAME ignoring its case. (defalias 'w3m-assoc-ignore-case #[(name alist) "\227\304 \203$ @:\203\n @@\227\230\203 @\304 A\211\204 *\207" [name match dname alist nil] 3 (#$ . 33826)]) #@65 Like `prin1', but control chars \C-x will be represented as ^X. (defalias 'w3m-prin1 #[(object &optional stream) ";\203W\305\306\305\"\305\211\203H @\211\307=\203\"\310 B\202A\n\311>\204.\n\312Y\2037\313\n! B\202A\314\313\315\n\\!P B A\211\204\305 \210*\316\317\320 \237\"\f\")\207\316\f\"\207" [object rest char --dolist-tail-- stream nil append 127 "^?" (9 10) 32 char-to-string "^" 64 prin1 apply concat] 5 (#$ . 34071)]) #@175 Change values in PLIST corresponding to PROPERTIES. This is similar to `plist-put', but handles plural symbol and value pairs and remove pairs from PLIST whose value is nil. (defalias 'w3m-modify-plist #[(plist &rest properties) "\203\302 @A@#AA\211\204 \2030 A@\203( @ A@D\244 AA\211\204\207" [properties plist plist-put] 5 (#$ . 34524)]) (put 'w3m-insert-string 'edebug-form-spec '(form)) #@92 Insert STRING at point without conversions in either case the multibyteness of the buffer. (defalias 'w3m-insert-string '(macro . #[(string) "\301\300DC\302BB\207" [string let ((insert (if (and (null enable-multibyte-characters) (multibyte-string-p string)) (encode-coding-string string 'utf-8-emacs) string)))] 3 (#$ . 34939)])) #@74 Initialize the hook option pointed by the SYMBOL with the default VALUE. (defalias 'w3m-custom-hook-initialize #[(symbol value) "\302!\203\303 !\211\205\304 @\"\210 A\211\202 \305 \"\207" [symbol value boundp eval add-hook custom-initialize-set] 4 (#$ . 35276)]) #@40 In STRING replace an alist of REGEXPS. (defalias 'w3m-replace-regexps-in-string #[(string &rest regexps) "A@\203\302@A@\303\304 AA##\207 \207" [regexps string replace-regexp-in-string apply w3m-replace-regexps-in-string] 7 (#$ . 35555)]) #@122 Update the tab-line appearance in BUFFER after SECONDS. BUFFER defaults to the current buffer. SECONDS defaults to 0.5. (defalias 'w3m-force-window-update-later #[(&optional buffer seconds) "\302\206\303\304\305 \206 p$\207" [seconds buffer run-with-timer 0.5 nil #[(buffer) "\301!\205\302\303\"\304 =\205\305 \207" [buffer buffer-live-p get-buffer-window t selected-window w3m-force-window-update] 3]] 5 (#$ . 35806)]) #@17 Make menu item. (defalias 'w3m-make-menu-item #[(japan english) "\203 \207\n\207" [w3m-use-japanese-menu japan english] 1 (#$ . 36243)]) (defvar w3m-make-menu-commands-keys nil) #@18 Make menu items. (defalias 'w3m-make-menu-commands #[(menu-commands) "\301\302\"\207" [menu-commands mapcar #[(c) ":\203[\304A@\3058\203\306\307\310\311@D\312\233BBE\202,\313\314\310\311@D\312\233BBE\315\3168\317@ \236\203@@ \236A\206X\320@\n\"\211\205W@\321 @!B B\211@A)&\207\322!\207" [c w3m-make-menu-commands-keys w3m-mode-map key vector 3 progn (switch-to-buffer w3m-tab-button-menu-current-buffer) funcall function 4 save-window-excursion (switch-to-buffer w3m-tab-button-menu-current-buffer) :active 2 :keys where-is-internal key-description symbol-name] 10]] 3 (#$ . 36430)]) #@28 Return t if buffer unseen. (defalias 'w3m-unseen-buffer-p #[(buffer) "rq\210 )\207" [buffer w3m-buffer-unseen] 1 (#$ . 37044)]) (defalias 'w3m-interactive-p '(macro . #[nil "\300\207" [(called-interactively-p 'any)] 1])) #@68 Ensure that a URL ends in a /. Useful for concatenation purposes. (defalias 'w3m-ensure-slash #[(url) "\301\232\204\211GSH\302=\203\207\303P\207" [url "" 47 "/"] 2 (#$ . 37272)]) #@216 Make temporary overriding function definitions. This is an analogue of a dynamically scoped `let' that operates on the function cell of FUNCs rather than their value cell. (fn ((FUNC ARGLIST BODY...) ...) FORM...) (defalias 'w3m-flet '(macro . #[(bindings &rest body) "\302\303\304\" BB\207" [bindings body cl-letf mapcar #[(binding) "\301\302@DD\303ABD\207" [binding symbol-function quote lambda] 3]] 4 (#$ . 37467)])) (byte-code "\300\301\302\303#\210\300\301\304\305#\207" [put w3m-flet lisp-indent-function 1 edebug-form-spec ((&rest (sexp sexp &rest form)) &rest form)] 4) #@56 Convert the car of `:args' as a widget type in WIDGET. (defalias 'w3m-widget-type-convert-widget #[(widget) "\303\304!\210\305\306K\307\216\306M\210\310\311\n\211@\262\312\313\n\314\"@!#+\207" [#1=#:vnew #2=#:old widget require wid-edit #[(widget value) "\207" [value] 1] widget-sexp-value-to-internal #[nil "\301M\207" [#2# widget-sexp-value-to-internal] 2] apply widget-convert eval widget-get :args] 7 (#$ . 38055)]) #@68 Run `easy-menu-add' (obsolete since 28.1) on Emacs 27 and earlier. (defalias 'w3m-easy-menu-add '(macro . #[(menu &optional map) "\303X\205\n\304 \nE\207" [emacs-major-version menu map 27 easy-menu-add] 3 (#$ . 38487)])) (defconst w3m-puny-code-regex "xn--\\([-0-9a-zA-z]+\\)") (defconst w3m-puny-code-nonascii "[^-]") (defconst w3m-puny-base 36) (defconst w3m-puny-tmin 1) (defconst w3m-puny-tmax 26) (defconst w3m-puny-damp 700) (defconst w3m-puny-skew 38) (defconst w3m-puny-initial-bias 72) (defconst w3m-puny-initial-n 128) (defconst w3m-puny-delimiter 45) (defalias 'w3m-puny-adapt #[(delta numpoints firsttime) "\306 \203 \n \245\202\n\307\245\n\211\f\245\\\n Z _\307\245V\2033\n Z\245 \\\202 ZT\n_\n\n\\\245\\)\207" [k firsttime delta w3m-puny-damp numpoints w3m-puny-base 0 2 w3m-puny-tmin w3m-puny-tmax w3m-puny-skew] 4]) (defalias 'w3m-puny-decode-digit #[(cp) "\302Z\303W\203\f\304Z\207\305Z\306W\203\305Z\207\307Z\306W\203$\307Z\207 \207" [cp w3m-puny-base 48 10 22 65 26 97] 2]) (defalias 'w3m-puny-encode-digit #[(d) "\301W\203\f\302\\\303\\\207\302\\\207" [d 26 22 75] 2]) (defalias 'w3m-puny-decode1 #[(input) "\n\fG\306\211\306\211\307\211\307\211\307\211\307 \306W\203M\fH U\203DT\211\2020*\306W\203t\fHBTT\211\202W*\237\306V\203\211T\202\214\306 W\203a\310!\3112 Y\203\255\312\313!\210\314\fH!\211!Y\203\300\312\313!\210T_\\ X\203\335\"\202\364 #\\Y\203\356#\202\364 ZW\203\315\311\307\"\210!Z_!\\\202\242\210T\316Z\306U# \245\\\246\211\306U\203J \233B\202YS\233 \233B\241\210T\202\214\317\320_\321\"\306\307$\211%\203\244%@$$\322\245I\210T$\322\246I\210T%A\211%\204x+.\207" [w3m-puny-initial-n n w3m-puny-initial-bias bias input len 0 nil 1 loop error "punycode bad input" w3m-puny-decode-digit throw w3m-puny-adapt make-string 2 97 256 in out i b digit thr oldi w k output ret j --dotimes-limit-- w3m-puny-delimiter w3m-puny-base w3m-puny-tmin w3m-puny-tmax op --dolist-tail--] 6]) (defalias 'w3m-puny-decode #[(input) "\3031\304 \305\216\306\307 \310\311O!\n\"*0\207\210 \207" [save-match-data-internal input w3m-puny-utf-16be (error) match-data #[nil "\301\302\"\207" [save-match-data-internal set-match-data evaporate] 3] decode-coding-string w3m-puny-decode1 4 nil] 5]) #@27 Decode URL from punycode. (defalias 'w3m-puny-decode-url #[(url) "\306\307\211\211\f\203V\310  \"\203V\310\311 \"\203V \312\313\224O \313\224\313\225O \312\225\307O\310 \"\203P \312\211\224O\314 \312\224\312\225O! \312\225\307OQ\2022\n Q  ,\207" [after host prot case-fold-search w3m-puny-utf-16be w3m-puny-code-regex t nil string-match "\\`[^:/]+://\\([^/]+\\)" 0 1 w3m-puny-decode url] 5 (#$ . 40976)]) (defalias 'w3m-puny-encode1 #[(input) "G\211\306\245  \307\211\310 \311_\312\"\313\211\313\211\313\211\313 \307 ! !W\203o H T \314_ H\\\211\315W\203fI\210T T\211 \2027*\211\307V\203\213\"I\210T\nW\203\324\316 \307 ! !W\203\324 H T \314_ H\\\211\fY\203\313W\203\313 T\211 \202\235*\fZT_\\ \307 ! !W\203\310 H T \314_ H\\\211\fW\203T\211\307U\203\317\320!\210\fU\203\277#\3212\231X\203@$\202Y%\\Y\203R%\202YZW\203f\322\321\313\"\210\323Z#Z\246\\!I\210TZ#Z\245#\\\211\2023\210\323!I\210T\324TU#\307T T\211 \202\355*T\fT\202\213\307O.\207" [input len h-len w3m-puny-initial-n n w3m-puny-initial-bias 2 0 make-string 4 97 nil 256 128 65536 error "punycode overflow" loop throw w3m-puny-encode-digit w3m-puny-adapt bias delta out output h b m q k thr uni j --dotimes-limit-- w3m-puny-delimiter w3m-puny-base w3m-puny-tmin w3m-puny-tmax] 8]) (defalias 'w3m-puny-encode #[(input) "\3021\303\304\305 \"!P0\207\210\207" [input w3m-puny-utf-16be (error) "xn--" w3m-puny-encode1 encode-coding-string] 5]) #@25 Encode URL to punycode. (defalias 'w3m-puny-encode-url #[(url) "\203s\306 !\204s\307\n \"\203s\310\211\211\311\312\313\"rq\210\314\216 c\210eb\210\315\316\310\313#\2037`\2029e\315\317\310\313#\203G`S\202Id\214 \f}\210eb\210\320\321\310\313#\203k\322\323!\323\224\323\225|\210\324 !c\210\202Q)\325ed\".\207 \207" [w3m-puny-utf-16be url w3m-puny-code-nonascii idn end beg w3m-url-local-p string-match nil generate-new-buffer " *temp*" t #[nil "\301!\205 \302!\207" [#1=#:temp-buffer buffer-name kill-buffer] 2] search-forward "://" "/" re-search-forward "[^.]?[^.-][^.]*" match-string-no-properties 0 w3m-puny-encode buffer-substring-no-properties #1#] 4 (#$ . 42665)]) (provide 'w3m-util)