;ELC ;;; compiled by wmperry@monolith.perry.org on Thu May 12 13:01:35 1994 ;;; from file /u/wmperry/lisp/development/w3/w3/w3-search.el ;;; emacs version 19.10 Lucid (beta22). ;;; bytecomp version 2.24; 26-Apr-94. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (defvar w3-allow-searching-of '("text/plain" "text/html" "text/x-setext" "application/x-troff-man" "application/x-troff-me" "application/x-troff-ms" "application/rtf" "text/richtext" "application/x-wais-source" "application/tex" "application/texinfo" "application/x-troff") "\ *A list of MIME content types that it is Ok for the automatic search to descend to.") (fset 'w3-do-search #[(term &optional base hops-limit restriction) "\n!\n! q\n! \n#)" [nil x base w3-view-url t w3-buffer-visiting w3-fetch w3-search-internal term hops-limit restriction] 4 "\ Recursively descend all the child links of the current document for TERM. TERM may be a string, in which case it is treated as a regular expression, and re-search-forward is used, or a symbol, in which case it is funcalled with 1 argument, the current URL being searched. BASE is the URL to start searching from. HOPS-LIMIT is the maximum number of nodes to descend before they search dies out. RESTRICTION is a regular expression or function to call with one argument, a URL that could be searched. If RESTRICTION returns non-nil, then the url is added to the queue, otherwise it is discarded. This is useful for restricting searching to either certain tyes of URLs (only search ftp links), or restricting searching to one domain (only search stuff in the indiana.edu domain). For use in functions passed to w3-do-search: QUEUE is the queue of links to be searched HOPS is the current number of hops from the root document RESULTS is an assoc list of (URL . RETVAL), where RETVAL is the value returned from previous calls to the TERM function (or point if searching for a regexp"]) (fset 'w3-normalize-url #[(url) "\"\"" [url nil string-match "#\\(.*\\)" w3-match 1] 3 "\ Normalize a URL, removing all '#' references from it, etc."]) (fset 'w3-search-internal #[(term &optional hops-limit restriction) "‰eb;!#B9!!!B!@B!q!!!֚!!eb;#B B9!B B*A ," [hops-limit 5 nil 0 hops results visited queue term w3-view-url t re-search-forward w3-map-links #[(x y) " 8!8 \" 8Ƈ; 8\"9 8!ɭ\n 8!C\n" [w3-member 8 w3-file-attributes 2 x w3-allow-searching-of nil restriction string-match t queue w3-normalize-url] 5] y x w3-buffer-visiting w3-retrieve w3-current-mime-type w3-extension-to-mime w3-file-extension w3-current-file "text/html" w3-prepare-buffer #[(link-data searching-func) "\n8!Ī ; \" 9 !ǭ !   \"Ī 8\"W!eb; #BB9  !BB! \"+" [w3-normalize-url 2 link-data url nil restriction string-match t w3-file-attributes info 0 num-children message "Skipping %s (not searchable)" w3-member 8 w3-allow-searching-of hops hops-limit w3-map-links #[(lnk arg) "T\n \"\n \"? \nC" [num-children w3-member url visited queue] 3] term re-search-forward results error "TERM must be a regular expression or symbol." "Skipping %s (why?)"] 6]] 6 "\ Recursively descend all the child links of the current document for TERM. TERM may be a string, in which case it is treated as a regular expression, and re-search-forward is used, or a symbol, in which case it is funcalled with 1 argument, the current URL being searched. HOPS-LIMIT is the maximum number of nodes to descend before they search dies out. RESTRICTION is a regular expression or function to call with one argument, a URL that could be searched. If RESTRICTION returns non-nil, then the url is added to the queue, otherwise it is discarded. This is useful for restricting searching to either certain tyes of URLs (only search ftp links), or restricting searching to one domain (only search stuff in the indiana.edu domain). For use in functions passed to w3-do-search: QUEUE is the queue of links to be searched HOPS is the current number of hops from the root document RESULTS is an assoc list of (URL . RETVAL), where RETVAL is the value returned from previous calls to the TERM function (or point if searching for a regexp"])