fyi update.

Multi-site search implemented. Refactored various.

Because multi-site is not documented on the Google website, there is a
chance that Google does not support it, which means multi-site may
break in the future.

At present, only 1 single-character flag is looked for in the
Keywords, and it must occur at the beginning.  It is still possible to
search using selected text as keywords.

=====================
My current snippet.

no flag - search only docs.python.org

t -- Tutorial
l -- Library Reference
m -- Macintosh Library Modules
r -- Reference Manual
e -- Extending and Embedding
a -- Python/C API

A -- (All) multi-search all 3 sites
B -- (Both) multi-search docs and pipermail at python.org
M -- (Mail) search only email archives (all lists) at python.org/pipermail

How to use:
-- unwrap into a single line
-- delete all spaces except for the one used to define 'spc'

javascript:spc='';E='http://www.google.com/search?q=';S='site:docs.python.org';PM='site:python.org/pipermail';D='';Q=document.getSelection();if(!Q){void(Q=prompt(S+'\n\n.....(text_selection_was_empty)',''))};K=Q.split(spc);if(K[0].length==1){F=K[0];Q=K.slice(1).join(spc);switch(F){case'a':D='api';break;case'e':D='ext';break;case'l':D='lib';break;case'm':D='mac';break;case'r':D='ref';break;case't':D='tut';break;case'A':S=S+'++OR++'+PM;break;case'B':S=S+'++OR++'+PM;break;case'M':S=PM+'';break;}};if(D){D='/'+D};if(Q){Q='+++++'+escape(Q)};location.href=E+S+D+Q

=======================
A template for customization.

How to use:
-- modifiy cases as desired
-- delete those unused
-- unwrap into a single line
-- delete all spaces except for the one used to define 'spc'

# spc - single space
# E   - Engine
# S   - Site(s)
# D   - Directory
# Q   - Query terms
# F   - Flag
# PM  - Python Mail archive