comparison lisp/net/webjump.el @ 49598:0d8b17d428b5

Trailing whitepace deleted.
author Juanma Barranquero <lekktu@gmail.com>
date Tue, 04 Feb 2003 13:24:35 +0000
parents 1655364ff839
children 695cf19ef79e d7ddb3e565de
comparison
equal deleted inserted replaced
49597:e88404e8f2cf 49598:0d8b17d428b5
1 ;;; webjump.el --- programmable Web hotlist 1 ;;; webjump.el --- programmable Web hotlist
2 2
3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc. 3 ;; Copyright (C) 1996, 1997 Free Software Foundation, Inc.
4 4
5 ;; Author: Neil W. Van Dyke <nwv@acm.org> 5 ;; Author: Neil W. Van Dyke <nwv@acm.org>
6 ;; Created: 09-Aug-1996 6 ;; Created: 09-Aug-1996
7 ;; Keywords: comm www 7 ;; Keywords: comm www
107 "ftp://ftp.stacken.kth.se" 107 "ftp://ftp.stacken.kth.se"
108 "ftp://isy.liu.se" 108 "ftp://isy.liu.se"
109 "ftp://ftp.luth.se/pub/unix/gnu" 109 "ftp://ftp.luth.se/pub/unix/gnu"
110 "ftp://ftp.sunet.se/pub/gnu" 110 "ftp://ftp.sunet.se/pub/gnu"
111 "ftp://archive.eu.net" 111 "ftp://archive.eu.net"
112 ;; SOUTH AMERICA: 112 ;; SOUTH AMERICA:
113 "ftp://ftp.inf.utfsm.cl/pub/gnu" 113 "ftp://ftp.inf.utfsm.cl/pub/gnu"
114 "ftp://ftp.unicamp.br/pub/gnu" 114 "ftp://ftp.unicamp.br/pub/gnu"
115 ;; WESTERN CANADA: 115 ;; WESTERN CANADA:
116 "ftp://ftp.cs.ubc.ca/mirror2/gnu" 116 "ftp://ftp.cs.ubc.ca/mirror2/gnu"
117 ;; USA: 117 ;; USA:
131 ;; Emacs. 131 ;; Emacs.
132 ("Emacs Lisp Archive" . 132 ("Emacs Lisp Archive" .
133 "ftp://ftp.emacs.org/pub/") 133 "ftp://ftp.emacs.org/pub/")
134 134
135 ;; Internet search engines. 135 ;; Internet search engines.
136 ("AltaVista" . 136 ("AltaVista" .
137 [simple-query 137 [simple-query
138 "www.altavista.digital.com" 138 "www.altavista.digital.com"
139 "www.altavista.digital.com/cgi-bin/query?pg=aq&what=web&fmt=.&q=" 139 "www.altavista.digital.com/cgi-bin/query?pg=aq&what=web&fmt=.&q="
140 "&r=&d0=&d1="]) 140 "&r=&d0=&d1="])
141 ("Archie" . 141 ("Archie" .
142 [simple-query "hoohoo.ncsa.uiuc.edu/cgi-bin/AA.pl" 142 [simple-query "hoohoo.ncsa.uiuc.edu/cgi-bin/AA.pl"
143 "hoohoo.ncsa.uiuc.edu/cgi-bin/AA.pl?query=" ""]) 143 "hoohoo.ncsa.uiuc.edu/cgi-bin/AA.pl?query=" ""])
144 ("Lycos" . 144 ("Lycos" .
145 [simple-query "www.lycos.com" 145 [simple-query "www.lycos.com"
146 "www.lycos.com/cgi-bin/pursuit?cat=lycos&query=" ""]) 146 "www.lycos.com/cgi-bin/pursuit?cat=lycos&query=" ""])
147 ("Yahoo" . 147 ("Yahoo" .
148 [simple-query "www.yahoo.com" "search.yahoo.com/bin/search?p=" ""]) 148 [simple-query "www.yahoo.com" "search.yahoo.com/bin/search?p=" ""])
149 149
150 ;; Misc. general interest. 150 ;; Misc. general interest.
151 ("Interactive Weather Information Network" . webjump-to-iwin) 151 ("Interactive Weather Information Network" . webjump-to-iwin)
152 ("Usenet FAQs" . 152 ("Usenet FAQs" .
153 [simple-query "www.cis.ohio-state.edu/hypertext/faq/usenet/FAQ-List.html" 153 [simple-query "www.cis.ohio-state.edu/hypertext/faq/usenet/FAQ-List.html"
154 "www.cis.ohio-state.edu/htbin/search-usenet-faqs/form?find=" 154 "www.cis.ohio-state.edu/htbin/search-usenet-faqs/form?find="
155 ""]) 155 ""])
156 ("RTFM Usenet FAQs by Group" . 156 ("RTFM Usenet FAQs by Group" .
157 "ftp://rtfm.mit.edu/pub/usenet-by-group/") 157 "ftp://rtfm.mit.edu/pub/usenet-by-group/")
285 ((vectorp expr) (webjump-builtin expr name)) 285 ((vectorp expr) (webjump-builtin expr name))
286 ((listp expr) (eval expr)) 286 ((listp expr) (eval expr))
287 ((symbolp expr) 287 ((symbolp expr)
288 (if (fboundp expr) 288 (if (fboundp expr)
289 (funcall expr name) 289 (funcall expr name)
290 (error "WebJump URL function \"%s\" undefined" 290 (error "WebJump URL function \"%s\" undefined"
291 expr))) 291 expr)))
292 (t (error "WebJump URL expression for \"%s\" invalid" 292 (t (error "WebJump URL expression for \"%s\" invalid"
293 name))))))) 293 name)))))))
294 294
295 (defun webjump-builtin (expr name) 295 (defun webjump-builtin (expr name)
341 341
342 (defun webjump-read-number (prompt) 342 (defun webjump-read-number (prompt)
343 ;; Note: I should make this more robust someday. 343 ;; Note: I should make this more robust someday.
344 (let ((input (webjump-read-string prompt))) 344 (let ((input (webjump-read-string prompt)))
345 (if input (string-to-number input)))) 345 (if input (string-to-number input))))
346 346
347 (defun webjump-read-string (prompt) 347 (defun webjump-read-string (prompt)
348 (let ((input (read-string (concat prompt ": ")))) 348 (let ((input (read-string (concat prompt ": "))))
349 (if (webjump-null-or-blank-string-p input) nil input))) 349 (if (webjump-null-or-blank-string-p input) nil input)))
350 350
351 (defun webjump-read-url-choice (what urls &optional default) 351 (defun webjump-read-url-choice (what urls &optional default)
352 ;; Note: Convert this to use `webjump-read-choice' someday. 352 ;; Note: Convert this to use `webjump-read-choice' someday.
353 (let* ((completions (mapcar (function (lambda (n) (cons n n))) 353 (let* ((completions (mapcar (function (lambda (n) (cons n n)))
354 urls)) 354 urls))
355 (input (completing-read (concat what 355 (input (completing-read (concat what