;ELC   
;;; Compiled by aatharuv@cutter-john.mit.edu on Sun Jan  5 20:53:46 2003
;;; from file /afs/sipb/contrib/emacs/packages/emacs-w3m-1.3.3-src/w3m-search.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-search.el' was compiled for Emacs 19.29 or later"))

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


(require 'w3m)
#@363 *An alist of search engines.
Each elemnt looks like (ENGINE ACTION CODING)
ENGINE is a string, the name of the search engine.
ACTION is a string, the URL that performs a search.
ACTION must contain a "%s", which is substituted by a query string.
CODING is optional value which is coding system for query string.
If omitted, `w3m-default-coding-system' is used.

(custom-declare-variable 'w3m-search-engine-alist '`(("yahoo" "http://search.yahoo.com/bin/search?p=%s" nil) ("yahoo-ja" "http://search.yahoo.co.jp/bin/search?p=%s" euc-japan) ,(if (equal "Japanese" w3m-language) '("google" "http://www.google.com/search?q=%s&hl=ja" shift_jis) '("google" "http://www.google.com/search?q=%s" nil)) ("google-ja" "http://www.google.com/search?q=%s&hl=ja&lr=lang_ja" shift_jis) ("goo-ja" "http://www.goo.ne.jp/default.asp?MT=%s" euc-japan) ("excite-ja" "http://www.excite.co.jp/search.gw?target=combined&look=excite_jp&lang=jp&tsug=-1&csug=-1&search=%s" shift_jis) ("lycos-ja" "http://www.lycos.co.jp/cgi-bin/pursuit?query=\"%s\"&cat=jp&encoding=shift-jis" shift_jis) ("altavista" "http://altavista.com/sites/search/web?q=\"%s\"&kl=ja&search=Search" nil) ("rpmfind" "http://rpmfind.net/linux/rpm2html/search.php?query=%s" nil) ("debian-pkg" "http://packages.debian.org/cgi-bin/search_contents.pl?directories=yes&arch=i386&version=unstable&case=insensitive&word=%s" nil) ("debian-bts" "http://bugs.debian.org/cgi-bin/pkgreport.cgi?archive=yes&pkg=%s" nil) ("freebsd-users-jp" "http://home.jp.FreeBSD.org/cgi-bin/namazu.cgi?key=\"%s\"&whence=0&max=50&format=long&sort=score&dbname=FreeBSD-users-jp" euc-japan) ("iij-archie" "http://www.iij.ad.jp/cgi-bin/archieplexform?query=%s&type=Case+Insensitive+Substring+Match&order=host&server=archie1.iij.ad.jp&hits=95&nice=Nice")) '(#$ . -660) :group 'w3m :type '(repeat (list (string :tag "Engine") (string :tag "Action") (coding-system))))
#@66 *Default search engine name.
See also `w3m-search-engine-alist'.
(custom-declare-variable 'w3m-search-default-engine '"yahoo" '(#$ . -2539) :group 'w3m :type 'string)
#@66 *Non-nil means that the word at point is used as initial string.
(custom-declare-variable 'w3m-search-word-at-point 't '(#$ . -2712) :group 'w3m :type 'boolean)
(defalias 'w3m-search-escape-query-string #[(str &optional coding) "\301\302\303!\304#\207" [str mapconcat #[(s) "\303	\206 \n\"\207" [s coding w3m-default-coding-system w3m-url-encode-string] 3] split-string "+"] 4])
#@194 Search QUERY using SEARCH-ENGINE.
When called interactively with prefix argument, you can choose search
engine deinfed in `w3m-search-engine-alist'.  Otherwise use
`w3m-search-default-engine'.
(defalias 'w3m-search #[(search-engine query) "\305\230?\205, \306	\n\"\211\203' \307\310\211A@)\311\211AA)@\"\"!\202+ \312\313	\")\207" [query search-engine w3m-search-engine-alist info x "" assoc w3m format w3m-search-escape-query-string error "Unknown search engine: %s"] 7 (#$ . 3101) (let ((engine (if current-prefix-arg (completing-read (format "Which Engine? (%s): " w3m-search-default-engine) w3m-search-engine-alist nil t) w3m-search-default-engine)) (default (unless (eq (get-text-property (line-beginning-position) 'face) 'w3m-header-line-location-title-face) (thing-at-point 'word))) prompt query) (when default (set-text-properties 0 (length default) nil default)) (setq prompt (if (and default (not w3m-search-word-at-point)) (format "%s search (default %s): " engine default) (format "%s search: " engine))) (setq query (if w3m-search-word-at-point (read-string prompt default) (read-string prompt nil nil default))) (list (if (string= engine "") w3m-search-default-engine engine) query))])
(provide 'w3m-search)
