home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 March / PCWELT_3_2006.ISO / base / 05_common.mo / usr / share / elvis-2.2_0 / scripts / define.ex < prev    next >
Encoding:
Text File  |  2004-02-22  |  567 b   |  27 lines

  1. "A macro for accessing the TechEncyclopaedia easily, without clutter.
  2.  
  3. alias define {
  4.  "fetch a definition from TechEncyclopaedia
  5.  local u="define:!1"
  6.  if "!1" == ""
  7.  then error usage: define TERM
  8.  if "!2" != ""
  9.  then let u=u;"+!2"
  10.  if "!3" != ""
  11.  then let t=u;"+!3"
  12.  split (u)
  13. }
  14.  
  15. alias readDEFINE {
  16.  local report=0
  17.  r http://www.techweb.com/encyclopedia/defineterm?term=!2
  18.  set nolocked
  19.  try 1,/termDefined/-1d
  20.  try /^<tr>/,$d
  21.  try g/<img .*>/d
  22.  try %s/href="\/encyclopedia\/defineterm?term=/href="define:/g
  23.  set bufdisplay=html
  24.  set nomod locked
  25.  try set nospell
  26. }
  27.