Mercurial > emacs
comparison lisp/net/webjump.el @ 38436:b174db545cfd
Some fixes to follow coding conventions.
author | Pavel Janík <Pavel@Janik.cz> |
---|---|
date | Mon, 16 Jul 2001 12:23:00 +0000 |
parents | b56f9152e329 |
children | 1655364ff839 |
comparison
equal
deleted
inserted
replaced
38435:a9102b5472f0 | 38436:b174db545cfd |
---|---|
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) |
296 (if (< (length expr) 1) | 296 (if (< (length expr) 1) |
297 (error "WebJump URL builtin for \"%s\" empty." name)) | 297 (error "WebJump URL builtin for \"%s\" empty" name)) |
298 (let ((builtin (aref expr 0))) | 298 (let ((builtin (aref expr 0))) |
299 (cond | 299 (cond |
300 ((eq builtin 'mirrors) | 300 ((eq builtin 'mirrors) |
301 (if (= (length expr) 1) | 301 (if (= (length expr) 1) |
302 (error | 302 (error |
305 ((eq builtin 'name) | 305 ((eq builtin 'name) |
306 name) | 306 name) |
307 ((eq builtin 'simple-query) | 307 ((eq builtin 'simple-query) |
308 (webjump-builtin-check-args expr name 3) | 308 (webjump-builtin-check-args expr name 3) |
309 (webjump-do-simple-query name (aref expr 1) (aref expr 2) (aref expr 3))) | 309 (webjump-do-simple-query name (aref expr 1) (aref expr 2) (aref expr 3))) |
310 (t (error "WebJump URL builtin \"%s\" for \"%s\" invalid." | 310 (t (error "WebJump URL builtin \"%s\" for \"%s\" invalid" |
311 builtin name))))) | 311 builtin name))))) |
312 | 312 |
313 (defun webjump-builtin-check-args (expr name count) | 313 (defun webjump-builtin-check-args (expr name count) |
314 (or (= (length expr) (1+ count)) | 314 (or (= (length expr) (1+ count)) |
315 (error "WebJump URL builtin \"%s\" for \"%s\" needs %d args." | 315 (error "WebJump URL builtin \"%s\" for \"%s\" needs %d args" |
316 (aref expr 0) name count))) | 316 (aref expr 0) name count))) |
317 | 317 |
318 (defun webjump-choose-mirror (name urls) | 318 (defun webjump-choose-mirror (name urls) |
319 (webjump-read-url-choice (concat name " mirror") | 319 (webjump-read-url-choice (concat name " mirror") |
320 urls | 320 urls |
398 | 398 |
399 ;;----------------------------------------------------------------------------- | 399 ;;----------------------------------------------------------------------------- |
400 | 400 |
401 (provide 'webjump) | 401 (provide 'webjump) |
402 | 402 |
403 ;; webjump.el ends here | 403 ;;; webjump.el ends here |