;ELC   
;;; Compiled by aatharuv@cutter-john.mit.edu on Sun Jan  5 20:53:43 2003
;;; from file /afs/sipb/contrib/emacs/packages/emacs-w3m-1.3.3-src/w3m-antenna.el
;;; in Emacs version 21.1.1
;;; with bytecomp version 2.85
;;; with all optimizations.

;;; This file uses dynamic docstrings, first added in Emacs 19.29.
(if (and (boundp 'emacs-version)
	 (< (aref emacs-version (1- (length emacs-version))) ?A)
	 (or (and (boundp 'epoch::version) epoch::version)
	     (string-lessp emacs-version "19.29")))
    (error "`w3m-antenna.el' was compiled for Emacs 19.29 or later"))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


(byte-code "\300\301!\210\300\302!\210\303\304\305\306\307\302\310\311&\210\312\313\314\315\316\317\320\305\321\322&	\207" [require w3m-util w3m custom-declare-group w3m-antenna nil "w3m-antenna - Utility to detect changes of WEB." :group :prefix "w3m-antenna-" define-widget string-with-default string "String widget with default value.\nWhen creating a new widget, its value is given by an expression specified\nwith :default-value-from." :tag "URL" :value-from :create string-with-default-value-create] 10)
(defalias 'string-with-default-value-create #[(widget) "\303\304\"\305\230\203& \306\304\303\307\"\310	!\211\203  	\311L\210\202\" \305\n*#\210\312!\207" [widget symbol value widget-get :value "" widget-put :value-from eval nil widget-default-create] 7])
#@46 List of WEB sites, watched by `w3m-antenna'.
(custom-declare-variable 'w3m-antenna-sites 'nil '(#$ . 1419) :group 'w3m-antenna :type '(repeat (list (string-with-default :tag "URL" :value-from w3m-antenna-tmp-url) (string-with-default :tag "Title" :value-from w3m-antenna-tmp-title) (choice :tag "Class" (const :tag "Normal" nil) (const :tag "Modified Time" time) (const :tag "HNS" hns)))))
#@27 HTML skeleton of antenna.
(custom-declare-variable 'w3m-antenna-html-skeleton '(eval-when-compile (concat "<!doctype html public \"-//W3C//DTD HTML 3.2//EN\">\n" "<html>\n<head>\n<title>Antenna</title>\n</head>\n<body>\n" "<h1>Antenna</h1>\n<h2>Updated</h2>\n<ul>\n%C</ul>\n" "<h2>Visited</h2>\n<ul>\n%U</ul>\n" "</body>\n</html>\n")) '(#$ . 1815) :group 'w3m-antenna :type 'string)
#@47 Function to make summary of site information.
(custom-declare-variable 'w3m-antenna-make-summary-function ''w3m-antenna-make-summary-like-natsumican '(#$ . 2204) :group 'w3m-antenna :type '(choice (function-item :tag "Simple style." w3m-antenna-make-summary) (function-item :tag "Natsumican style." w3m-antenna-make-summary-like-natsumican) (function :tag "User function.")))
#@41 Function to sort list of changed sites.
(custom-declare-variable 'w3m-antenna-sort-changed-sites-function ''w3m-antenna-sort-sites-by-time '(#$ . 2586) :group 'w3m-antenna :type '(choice (function-item :tag "Sort by last modification time." w3m-antenna-sort-sites-by-time) (function-item :tag "Sort by title." w3m-antenna-sort-sites-by-title) (function-item :tag "Do nothing." identity) (function :tag "User function.")))
#@43 Function to sort list of unchanged sites.
(custom-declare-variable 'w3m-antenna-sort-unchanged-sites-function ''w3m-antenna-sort-sites-by-time '(#$ . 3014) :group 'w3m-antenna :type '(choice (function-item :tag "Sort by last modification time." w3m-antenna-sort-sites-by-time) (function-item :tag "Sort by title." w3m-antenna-sort-sites-by-title) (function-item :tag "Do nothing." identity) (function :tag "User function.")))
#@38 File which has list of antenna URLs.
(custom-declare-variable 'w3m-antenna-file '(expand-file-name ".antenna" w3m-profile-directory) '(#$ . 3446) :group 'w3m-antenna :type 'file)
#@332 A list of site information (internal variable).  nil means that
antenna database is not initialised.  Each site information is a list
whose elements are:
 0. Format string of URL.
 1. Title.
 2. Class (Normal, HNS or TIME).
 3. Real URL.
 4. Last modification time.
 5. Size in bytes.
 6. Time when size modification is detected.

(defvar w3m-antenna-alist nil (#$ . 3632))
(defalias 'w3m-antenna-site-key '(macro . #[(site) "\301D\207" [site car] 2]))
(defalias 'w3m-antenna-site-title '(macro . #[(site) "\301\302E\207" [site nth 1] 3]))
(defalias 'w3m-antenna-site-class '(macro . #[(site) "\301\302E\207" [site nth 2] 3]))
(defalias 'w3m-antenna-site-url '(macro . #[(site) "\301\302E\207" [site nth 3] 3]))
(defalias 'w3m-antenna-site-last-modified '(macro . #[(site) "\301\302E\207" [site nth 4] 3]))
(defalias 'w3m-antenna-site-size '(macro . #[(site) "\301\302E\207" [site nth 5] 3]))
(defalias 'w3m-antenna-site-size-detected '(macro . #[(site) "\301\302E\207" [site nth 6] 3]))
(defalias 'w3m-antenna-setup #[nil "?\205Q \305	!\211\203 \306@8;\204 \307\310\"\n\203K \n\311\211\203H \f@\312@\"\204A \313\314@\315 \"\311\211\211F\"B\fA\211\204& *\311\207\307\316\"\211\207" [w3m-antenna-alist w3m-antenna-file w3m-antenna-sites site #1=#:--dolist-temp--4139 w3m-load-list 3 mapcar #[(site) "\301@A@\3028\303@\304 \"F\305\233\"\207" [site append 2 format-time-string current-time 3] 7] nil assoc append format-time-string current-time #[(site) "@A@\3018E\207" [site 2] 4]] 8])
(defalias 'w3m-antenna-shutdown #[nil "\211\203 \302	\303\304$\210\303\207" [w3m-antenna-alist w3m-antenna-file w3m-save-list nil t] 6])
(defalias 'w3m-antenna-hns-last-modified #[(url no-cache handler) "\306	!\307\n!\206 \310\n!\211\fB\311!\210))\312\313!\312\314!\211\315L\210\315L\210\316\317\320\321\322D\321D\321D\323\257EL\210\324L\210\316\325CJ\325FErq\210\326\327\330 \"\315!\315\211&*\211\211\":\205\204 \331\"A!\205\204 \"A\332H\333=)\203\231 \203\222 \202\322 \334!\202\322 J#\211\211\":\205\273 \331\"A!\205\273 \"A\332H\333=)\203\320 \203\311 \202\322 \334!\202\322 -\207" [handler w3m-work-buffer-name name buf w3m-work-buffer-list #1=#:--temp-buffer--4141 generate-new-buffer-name get-buffer get-buffer-create buffer-disable-undo make-symbol "--G4143--" "--G4142--" nil lambda (&rest --cl-rest--) apply quote #[(#2=#:G4146 #3=#:G4147 type handler #1#) "J	\n#\211\211:\205 \305\fA!\205 \fA\306H\307=)?\205' \n\206% \310	!\207" [#2# type handler #1# object vectorp 0 w3m-process-object identity] 5] --cl-rest-- #[(type handler #1#) "\304\216rq\210	\205a \305\211eb\210\306\307\305\310#\205< \311\225\211\205< \306\312\305\310#\205< \311\224{\211\205< \313\314\n\"?\205< \315\n!*\206a eb\210\316\317\305\310#\205a \320\311\211\211\321\322\323!!\321\322\324!!\321\322\325!!\326&*\207" [#1# type str start ((byte-code "\211\204 p	;\203 \303	!\304	!\203 \305	!\210\306	\n\")\307\207" [#1# buffer w3m-work-buffer-list get-buffer buffer-live-p kill-buffer delq nil] 4)) nil search-forward "\nLast-Modified: " t 0 "<br>" string-match " *[0-9][0-9][0-9][0-9], +[0-9][0-9] +[0-9][0-9] +" w3m-time-parse-string re-search-forward "^newest day is \\([0-9][0-9][0-9][0-9]\\)/\\([0-9][0-9]\\)/\\([0-9][0-9]\\)$" encode-time string-to-number match-string 3 2 1 "JST"] 9] type w3m-retrieve w3m-expand-url "di.cgi" vectorp 0 w3m-process-object w3m-process-start-process #4=#:--this-handler--4140 #5=#:--G4142--4145 #6=#:--G4143--4144 url no-cache object] 9])
(defalias 'w3m-antenna-check-site #[(site no-cache handler) "\306\307!\306\310!\306\311!\211L\210	\fL\210\312@\313 \"L\210\314\nJ8\315=\203\370 $\306\316!\306\317!%\211&\320L\210%\320L\210&\321\322\323\324\325D\324%D\324&D\324D\324	D\324\nD\326\257EL\210%\321\322\323\324\327D\324%D\324&D\324D\324	D\324\nD\326\257EL\210\321\330C&J\330$EE\331J	J#)\211\211':\205\247 \332'A!\205\247 'A\333H\334=)\203\274 $\203\265 \202\364 \335!\202\364 %J$\"\211\211':\205\335 \332'A!\205\335 'A\333H\334=)\203\362 $\203\353 \202\364 \335!\202\364 ,\202\307(\306\336!\306\337!)\211*\320L\210)\320L\210*\321\322\323\324\340D\324)D\324*D\324D\324	D\324\nD\326\257EL\210)\321\322\323\324\341D\324)D\324*D\324D\324	D\324\nD\326\257EL\210\321\342C*J\342(EE\343J	J#)\211\"\211':\205y\332'A!\205y'A\333H\334=)\203\216(\203\207\"\202\306\335\"!\202\306)J\"(\"\211\"\211':\205\257\332'A!\205\257'A\333H\334=)\203\304(\203\275\"\202\306\335\"!\202\306\",+\207" [#1=#:--url--4158 #2=#:--no-cache--4157 #3=#:--site--4156 site no-cache handler make-symbol "--site--" "--no-cache--" "--url--" format-time-string current-time 2 hns "--G4161--" "--G4160--" nil lambda (&rest --cl-rest--) apply quote #[(#4=#:G4164 #5=#:G4165 #6=#:G4166 #7=#:G4167 #8=#:G4168 time handler) "J	\n\"\211\211:\205 \304A!\205 A\305H\306=)?\205& \n\206$ \307	!\207" [#4# time handler object vectorp 0 w3m-process-object identity] 4] --cl-rest-- #[(#9=#:G4169 #10=#:G4170 #11=#:G4171 #12=#:G4172 #13=#:G4173 time handler) "\205\f \303	J\nJ\304$\207" [time #13# #11# w3m-antenna-check-site-after nil] 5] time w3m-antenna-hns-last-modified vectorp 0 w3m-process-object w3m-process-start-process "--G4184--" "--G4183--" #[(#14=#:G4187 #15=#:G4188 #16=#:G4189 #17=#:G4190 #18=#:G4191 attr handler) "J	\n\"\211\211:\205 \304A!\205 A\305H\306=)?\205& \n\206$ \307	!\207" [#14# attr handler object vectorp 0 w3m-process-object identity] 4] #[(#19=#:G4220 #20=#:G4221 #21=#:G4222 #22=#:G4223 #23=#:G4224 attr handler) "\205A\3068\203 \307	J\nJ\3068\3108$\207\310	J8\311=?\205A\3108\2032 \307	J\nJ\312\3108$\207\313\f!\314!\206P \315!\211 B \316!\210))!\"\317\320!\317\321!#\211$\312L\210#\312L\210$\322\323\324\325\326D\325#D\325$D\325%D\325&D\325\nD\325'D\325	D\327\257\nEL\210#\322\323\324\325\330D\325#D\325$D\325%D\325&D\325\nD\325'D\325	D\327\257\nEL\210\322\331C$J\331\"!FEr!q\210\332\nJ\312'J\312\211&*\211\211(:\205\361 \333(A!\205\361 (A\334H\335=)\203\"\203\377 \202@\336!\202@#J\"!#\211\211(:\205)\333(A!\205)(A\334H\335=)\203>\"\2037\202@\336!\202@-\207" [attr #23# #21# handler w3m-work-buffer-name name 4 w3m-antenna-check-site-after 2 time nil generate-new-buffer-name get-buffer get-buffer-create buffer-disable-undo make-symbol "--G4195--" "--G4194--" lambda (&rest --cl-rest--) apply quote #[(#24=#:G4198 #25=#:G4199 #26=#:G4200 #27=#:G4201 #28=#:G4202 #29=#:G4203 #30=#:G4204 type handler #31=#:--temp-buffer--4193) "J	\n#\211\211:\205 \305\fA!\205 \fA\306H\307=)?\205' \n\206% \310	!\207" [#24# type handler #31# object vectorp 0 w3m-process-object identity] 5] --cl-rest-- #[(#32=#:G4205 #33=#:G4206 #34=#:G4207 #35=#:G4208 #36=#:G4209 #37=#:G4210 #38=#:G4211 type handler #31#) "\304\216rq\210	\205 \305\nJ\306	#\210\307 \210\310J\nJ\306\311 $*\207" [#31# type #36# #38# ((byte-code "\211\204 p	;\203 \303	!\304	!\203 \305	!\210\306	\n\")\307\207" [#31# buffer w3m-work-buffer-list get-buffer buffer-live-p kill-buffer delq nil] 4)) w3m-decode-buffer nil w3m-remove-comments w3m-antenna-check-site-after buffer-size] 5] type w3m-retrieve vectorp 0 w3m-process-object w3m-process-start-process buf w3m-work-buffer-list #31# #39=#:--this-handler--4192 #40=#:--G4194--4197 #41=#:--G4195--4196 #19# #20# #22# object] 14] attr w3m-attributes #42=#:--this-handler--4159 #43=#:--G4160--4163 #44=#:--G4161--4162 object #45=#:--this-handler--4182 #46=#:--G4183--4186 #47=#:--G4184--4185] 12])
(defalias 'w3m-antenna-check-site-after #[(site url time size) "\306@	\"\211\2038 \n\307A\f\211\2050 \310\n8\2050 \310\n8U\204( \311 \2020 \312\n8\2060 \311 F\"\241\210\n\202@ \307\f\313F\")\207" [site w3m-antenna-alist pre url time size assoc append 5 current-time 6 nil] 10])
#@51 Check all sites specified in `w3m-antenna-sites'.
(defalias 'w3m-antenna-check-all-sites #[(&optional handler) "\306 \210\204: \307\310\311\312!)\211\211:\205& \313A!\205& A\314H\315=)\2037 \316\317\320\217\210\321\nA\322H\323\"\210\n*\207\324\325!\324\326!\211\314L\210\fpL\210\307\211\327\330\331\332\314\333\334DEE\335\fD\336\f\337\340BBEFE$%&\307'\211(\203\260 (@'\341'\310#\211%\211:\205\226 \313A!\205\226 A\314H\315=)\203\247 %$B$\211JTL\210(A\211(\204u *$\204\273 \342 \202\301 \343 \210$@-\207" [handler w3m-process-waited #1=#:--result--4239 object buffer count w3m-antenna-setup nil t #[(x) "\211\207" [x #1#] 2] w3m-antenna-check-all-sites vectorp 0 w3m-process-object error (byte-code "\306 \307\211\310\311\"\210\312A\313H!\314=\203\244 \315\307\316\317#\210\203 \f\306 @\f@Z\320_\211A@)\\\f\211A@)[\\*W\203 \305\307B\321\"A\313H\322!\203\226 \323\324\"\210\325\324\"\210\312!\314=\203\226 \326!\210\203\226 \312!\314=\203\226 \327\330!\210\202\206 )\331@A\"\210*\202 ,\307\207" [#1# inhibit-quit w3m-process-inhibit-quit w3m-current-process start w3m-process-timeout current-time nil w3m-process-start-process t process-status 2 run accept-process-output 0 200 65536 delq processp set-process-filter ignore set-process-sentinel kill-process sit-for 0.1 signal end x process error-data w3m-process-queue w3m-process-kill-surely] 4) ((quit (byte-code "	\306\n\f\"\nA\307H\310\n!\203= \311\n\312\"\210\313\n\312\"\210\314\n!\315=\203= \316\n!\210\203= \314\n!\315=\203= \317\320!\210\202. )\321@A\"\210*\306\207" [error #1# process error-data w3m-process-queue w3m-process-kill-surely delq 2 processp set-process-filter ignore set-process-sentinel process-status run kill-process sit-for 0.1 signal] 3))) w3m-process-sentinel 2 "finished\n" gensym "--antenna-count--" "--antenna-buffer--" lambda (x) and = setq 1- buffer-name with-current-buffer funcall ((w3m-antenna-shutdown)) w3m-antenna-check-site w3m-antenna-shutdown w3m-process-start-queued-processes processes tmp w3m-antenna-sites site #2=#:--dolist-temp--4240] 13 (#$ . 11551)])
(defalias 'w3m-antenna-make-summary #[(site) "\301\302\3038A@\3048\203 \305\3048!\202! \3068\203  \307\202! \310$\207" [site format "<li><a href=\"%s\">%s</a> %s" 3 4 current-time-string 5 "Size" ""] 7])
(defalias 'w3m-antenna-make-summary-like-natsumican #[(site) "\3038\3048\305\306\n\204 	\203 \307\310\n\206 	\"\202 \311\n\203& \312\202/ 	\203. \313\202/ \314\3158A@%*\207" [site t2 t1 4 6 format "<li>%20s&nbsp;&nbsp;(%s)&nbsp;&nbsp;<a href=\"%s\">%s</a>" format-time-string "%Y/%m/%d %R" "----/--/-- --:--" "T" "S" "?" 3] 6])
(defalias 'w3m-antenna-sort-sites-by-time #[(sites) "\301\302\"\207" [sites sort #[(a b) "\3028\206	 \3038\302	8\206 \303	8\211\2054 	?\2064 @	@V\2064 @	@U\2054 A@	A@V*\207" [a b 4 6] 4]] 3])
(defalias 'w3m-antenna-sort-sites-by-title #[(sites) "\301\302\"\207" [sites sort #[(a b) "A@	A@\231\207" [a b] 2]] 3])
(defalias 'w3m-antenna-make-contents #[(changed-sites unchanged-sites) "c\210eb\210\306\307\310\311#\205\\ \312\224f\211\313>\203R \214\314\224\314\225}\210ed|\210eb\210	\315=\2030 \n\2021 \310\211\203J @\f!\316\261\210A\211\2048 *db\210)\202X \312\224\312\225|\210)\202 \207" [w3m-antenna-html-skeleton c changed-sites unchanged-sites site #1=#:--dolist-temp--4241 re-search-forward "%\\(.\\)" nil t 1 (67 85) 0 67 "\n" w3m-antenna-make-summary-function] 5])
(defalias 'w3m-about-antenna #[(url &optional no-decode no-cache post-data referer handler) "\306\307!\306\310!\211\311L\210\n\311L\210\312\313\314\315\316D\315\nD\315D\317\257EL\210\n\320L\210\312\321CJ\321	EE\f\203= \322!\202E \206E \323!)\211\211:\205_ \324A!\205_ A\325H\326=)\203s 	\203l \202\250 \327!\202\250 \nJ	\"\211\211:\205\222 \324A!\205\222 A\325H\326=)\203\246 	\203\237 \202\250 \327!\202\250 ,\207" [handler #1=#:--this-handler--4242 #2=#:--G4243--4246 #3=#:--G4244--4245 no-cache w3m-antenna-alist make-symbol "--G4244--" "--G4243--" nil lambda (&rest --cl-rest--) apply quote #[(#4=#:G4247 #5=#:G4248 alist handler) "J	\n\"\211\211:\205 \304A!\205 A\305H\306=)?\205& \n\206$ \307	!\207" [#4# alist handler object vectorp 0 w3m-process-object identity] 4] --cl-rest-- #[(alist handler) "\306\211\n\306\211\203Y \f@\3078\206 \3108\311\3128!\211\205C ?\206C @@V\206C @@U\205C A@A@V*\203N 	B\202R B\fA\211\204\f *\313	\237!\237!\"\210*\314\207" [unchanged changed alist site #6=#:--dolist-temp--4249 b nil 4 6 w3m-arrived-last-modified 3 w3m-antenna-make-contents "text/html" a w3m-antenna-sort-changed-sites-function w3m-antenna-sort-unchanged-sites-function] 5] alist w3m-antenna-check-all-sites w3m-load-list vectorp 0 w3m-process-object w3m-process-start-process w3m-antenna-file object] 9])
#@73 Report changes of WEB sites, which is specified in `w3m-antenna-sites'.
(defalias 'w3m-antenna #[(&optional no-cache) "\301\302\"\207" [no-cache w3m-goto-url "about://antenna/"] 3 (#$ . 16446) "P"])
(byte-code "\301B\303\301!\204\f \304\302B\303\302!\204 \304\304\207" [current-load-list w3m-antenna-tmp-url w3m-antenna-tmp-title boundp nil] 2)
#@95 Add link of current page to antenna.
With prefix, ask new url to add instead of current page.
(defalias 'w3m-antenna-add-current-url #[(&optional arg) "\303\203\n \304 \202 	\n\"\207" [arg w3m-current-url w3m-current-title w3m-antenna-add w3m-input-url] 3 (#$ . 16805) "P"])
#@63 Add URL to antenna.
Optional argument TITLE is title of link.
(defalias 'w3m-antenna-add #[(url &optional title) "\n\304\305!\210\306\307!\210\310u\210\311`!\210\306\312!\210\313u\207" [url w3m-antenna-tmp-url title w3m-antenna-tmp-title customize-variable w3m-antenna-sites re-search-forward "INS" -1 widget-button-press "State:" -2] 2 (#$ . 17088)])
(provide 'w3m-antenna)
