;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306\301\307\310&\210\302\311\312\313\306\301\307\314&\210\302\315\316\317\306\301\307\320&\207" [require w3m custom-declare-variable w3m-search-engine-alist (let ((ja nil)) `(,@(if ja '(("yahoo" "https://search.yahoo.co.jp/bin/search?p=%s" euc-japan) ("yahoo-en" "https://search.yahoo.com/bin/search?p=%s")) '(("yahoo" "https://search.yahoo.com/bin/search?p=%s") ("yahoo-ja" "https://search.yahoo.co.jp/bin/search?p=%s" euc-japan))) ("alc" "https://eow.alc.co.jp/%s/UTF-8/" utf-8) ,@(if ja '(("blog" "https://blogsearch.google.com/blogsearch?q=%s&hl=ja&lr=lang_ja&oe=utf-8&ie=utf-8" utf-8) ("blog-en" "https://blogsearch.google.com/blogsearch?q=%s&hl=en&oe=utf-8&ie=utf-8" utf-8)) '(("blog" "https://blogsearch.google.com/blogsearch?q=%s&oe=utf-8&ie=utf-8" utf-8) ("blog-en" "https://blogsearch.google.com/blogsearch?q=%s&hl=en&oe=utf-8&ie=utf-8" utf-8))) ,@(if ja '(("google" "https://www.google.com/search?q=%s&hl=ja&lr=lang_ja&ie=utf-8&oe=utf-8&gbv=1" utf-8) ("google-en" "https://www.google.com/search?q=%s&hl=en&ie=utf-8&oe=utf-8&gbv=1" utf-8)) '(("google" "https://www.google.com/search?q=%s&ie=utf-8&oe=utf-8&gbv=1" utf-8) ("google-en" "https://www.google.com/search?q=%s&hl=en&ie=utf-8&oe=utf-8&gbv=1" utf-8))) ,@(if ja '(("google news" "https://news.google.co.jp/news?q=%s&hl=ja&ie=utf-8&oe=utf-8" utf-8) ("google news-en" "https://news.google.com/news?q=%s&hl=en")) '(("google news" "https://news.google.com/news?q=%s&ie=utf-8&oe=utf-8" utf-8) ("google news-en" "https://news.google.com/news?q=%s&hl=en&ie=utf-8&oe=utf-8"))) ,@(if ja '(("technorati" "https://www.technorati.jp/search/search.html?query=%s&language=ja" utf-8) ("technorati-en" "https://www.technorati.com/search/%s" utf-8)) '(("technorati" "https://www.technorati.com/search/%s" utf-8) ("technorati-ja" "https://www.technorati.jp/search/search.html?query=%s&language=ja" utf-8))) ("technorati-tag" "https://www.technorati.com/tag/%s" utf-8) ("goo-ja" "https://search.goo.ne.jp/web.jsp?MT=%s" euc-japan) ("excite-ja" "https://www.excite.co.jp/search.gw?target=combined&look=excite_jp&lang=jp&tsug=-1&csug=-1&search=%s" shift_jis) ("altavista" "https://altavista.com/sites/search/web?q=\"%s\"&kl=ja&search=Search") ("rpmfind" "https://rpmfind.net/linux/rpm2html/search.php?query=%s" nil) ("debian-pkg" "https://packages.debian.org/search?&searchon=names&suite=stable§ion=all&arch=amd64&keywords=%s") ("debian-bts" "https://bugs.debian.org/cgi-bin/pkgreport.cgi?archive=yes&pkg=%s") ("freebsd-users-jp" "https://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" "https://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") ("waei" "https://dictionary.goo.ne.jp/search.php?MT=%s&kind=je" euc-japan) ("eiwa" "https://dictionary.goo.ne.jp/search.php?MT=%s&kind=ej") ("kokugo" "https://dictionary.goo.ne.jp/search.php?MT=%s&kind=jn" euc-japan) ("eiei" "https://www.dictionary.com/cgi-bin/dict.pl?term=%s&r=67") ,@(if ja '(("amazon" "https://www.amazon.co.jp/gp/search?__mk_ja_JP=%%83J%%83%%5E%%83J%%83i&url=search-alias%%3Daps&field-keywords=%s" shift_jis) ("amazon-en" "https://www.amazon.com/exec/obidos/search-handle-form/250-7496892-7797857" iso-8859-1 "url=index=blended&field-keywords=%s")) '(("amazon" "https://www.amazon.com/exec/obidos/search-handle-form/250-7496892-7797857" iso-8859-1 "url=index=blended&field-keywords=%s") ("amazon-ja" "https://www.amazon.co.jp/gp/search?__mk_ja_JP=%%83J%%83%%5E%%83J%%83i&url=search-alias%%3Daps&field-keywords=%s" shift_jis))) ("emacswiki" "https://www.emacswiki.org/cgi-bin/wiki?search=%s") ("en.wikipedia" "https://en.wikipedia.org/wiki/Special:Search?search=%s&sourceid=Mozilla-search&ns0=1") ("de.wikipedia" "https://de.wikipedia.org/wiki/Spezial:Search?search=%s&sourceid=Mozilla-search&ns0=1" utf-8) ("ja.wikipedia" "https://ja.wikipedia.org/wiki/Special:Search?search=%s&sourceid=Mozilla-search&ns0=1" utf-8) ("msdn" "https://search.msdn.microsoft.com/search/default.aspx?query=%s") ("duckduckgo" "https://lite.duckduckgo.com/lite" utf-8 "q=%s"))) "An alist of search engines.\nEach element looks like (ENGINE ACTION CODING POST-DATA)\nENGINE is a string, the name of the search engine.\nACTION is a string, the URL that performs a search.\nACTION must contain a \"%s\", which is substituted by a query string.\nCODING is optional value which is coding system for query string.\nPOST-DATA is optional value which is a string for POST method search engine.\nIf CODING is omitted, it defaults to `w3m-default-coding-system'." :group :type (repeat (group :format "%v" :indent 2 (string :format "Engine: %v") (string :format "Action: %v") (coding-system :format "%t: %v") (checklist :inline t (string :format "PostData: %v")))) w3m-search-default-engine "google" "Name of the default search engine.\nSee also `w3m-search-engine-alist'." (radio :convert-widget w3m-widget-type-convert-widget `(,@(mapcar (lambda (x) (list 'const (substring-no-properties (car x)))) w3m-search-engine-alist))) w3m-search-word-at-point t "Non-nil means that the word at point is used as an initial string.\nIf Transient Mark mode, this option is ignored and the region is used\nas an initial string." boolean] 8) #@70 History variable used by `w3m-search' for prompting a search engine. (defvar w3m-search-engine-history nil (#$ . 5425)) #@63 Argument for `thing-at-point' used in `w3m-search-read-query' (defvar w3m-search-thing-at-point-arg 'word (#$ . 5551)) (defalias 'w3m-search-escape-query-string #[(str &optional coding) "\301\302\303!\304#\207" [str mapconcat #[(s) "\302 \"\207" [s coding w3m-url-encode-string] 3] split-string "+"] 4]) #@180 Read a query from the minibuffer, prompting with string PROMPT. When a default value for the query is discovered, prompt with string PROMPT-WITH-DEFAULT instead of string PROMPT. (defalias 'w3m-search-read-query #[(prompt prompt-with-default &optional history) "\306 \203 \307 \310 {\202*\311=\205#\312\313 \314\"<\205#\315\312\313 \314\">?\205*\316 !\317\211\203N\320\321 G\317 $\210\f\204B\306 \203F \317\306 \203N\322 \210\323 \203Z\324 \"\202\\\n $*\207" [major-mode w3m-search-thing-at-point-arg initial default w3m-search-word-at-point prompt-with-default region-active-p region-beginning region-end w3m-mode get-text-property point-at-bol face w3m-header-line-title thing-at-point nil set-text-properties 0 deactivate-mark read-string format prompt history] 6 (#$ . 5864)]) #@251 Ask for a search engine and words to query and return them as a list. WHERE is a string which should have the value "current" is the calling function intends for the search results to be presented in the current buffer, or "new" if in a new buffer. (defalias 'w3m-search-read-variables #[(where) "\306 \210\307\310\"\n\203+ @\206\f\311\312\307\313 #\314\311\314\303&*\202,\f\315\307\316 #\307\317\"\"+D\207" [where prompt-prefix current-prefix-arg w3m-search-engine-history w3m-search-default-engine completion-ignore-case w3m--buffer-busy-error format "Search in %s buffer. " t completing-read "%sWhich engine? (default %s): " nil w3m-search-read-query "%s %s search: " "%s search (default %%s): " default w3m-search-engine-alist search-engine query] 8 (#$ . 6673)]) #@53 Call W3M-GOTO-FUNCTION with the URL for the search. (defalias 'w3m-search-do-search #[(w3m-goto-function search-engine query) "\306\230?\205=\307 \n\"\211\2038\310 AA@\" AAA@\311 \210\312 A@ \"\f\313\f\2053\312\f \"$*\202<\314\315 \")\207" [query search-engine w3m-search-engine-alist info post-data query-string "" assoc w3m-search-escape-query-string w3m-history-store-position format nil error "Unknown search engine: %s" w3m-goto-function] 8 (#$ . 7476)]) #@354 Search QUERY using SEARCH-ENGINE. Search results will appear in the current buffer. When called interactively with a prefix argument, you can choose one of the search engines defined in `w3m-search-engine-alist'. Otherwise use `w3m-search-default-engine'. If Transient Mark mode, use the region as an initial string of query and deactivate the mark. (defalias 'w3m-search #[(search-engine query) "\302\303 #\207" [search-engine query w3m-search-do-search w3m-goto-url] 4 (#$ . 7954) (w3m-search-read-variables "current")]) #@55 Like `w3m-search', but do the search in a new buffer. (defalias 'w3m-search-new-session #[(search-engine query) "\302\303 #\207" [search-engine query w3m-search-do-search w3m-goto-url-new-session] 4 (#$ . 8487) (w3m-search-read-variables "new")]) #@67 Generate query string for ENGINE from URI matched by last search. (defalias 'w3m-search-uri-replace #[(uri engine) "\305\225\306O\307 \n\" \205\310 A@\311\f AA@\"\"*\207" [uri engine w3m-search-engine-alist info query 0 nil assoc format w3m-search-escape-query-string] 5 (#$ . 8741)]) (provide 'w3m-search)