comparison lisp/hyperbole/hsys-wais.el @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:376386a54a3c
1 ;;!emacs
2 ;;
3 ;; FILE: hsys-wais.el
4 ;; SUMMARY: Hyperbole support for WAIS browsing.
5 ;; USAGE: GNU Emacs Lisp Library
6 ;; KEYWORDS: comm, help, hypermedia
7 ;;
8 ;; AUTHOR: Bob Weiner
9 ;; ORG: Brown U.
10 ;;
11 ;; ORIG-DATE: 5-Nov-91 at 20:53:26
12 ;; LAST-MOD: 30-Oct-95 at 22:48:21 by Bob Weiner
13 ;;
14 ;; This file is part of Hyperbole.
15 ;; Available for use and distribution under the same terms as GNU Emacs.
16 ;;
17 ;; Copyright (C) 1991, 1995, Free Software Foundation, Inc.
18 ;; Developed with support from Motorola Inc.
19 ;;
20 ;; DESCRIPTION:
21 ;;
22 ;; For information on WAIS, see ftp://ftp.wais.com:/pub/.
23 ;; The freeware/ subdirectory there contains free source code to support
24 ;; WAIS on most standard architectures.
25 ;;
26 ;; DESCRIP-END.
27
28 ;;; ************************************************************************
29 ;;; Other required Elisp libraries
30 ;;; ************************************************************************
31
32 ;; Autoload wais.
33 (autoload 'wais "wais" "Client-server full-text retrieval" t)
34 (autoload 'waisd-mode "wais" "Wide Area Information Services" t)
35 (autoload 'wais-select-question "wais" "Select a new WAIS question." t)
36 (autoload 'wais-create-question "wais" "Create a new WAIS question." t)
37
38 ;;; ************************************************************************
39 ;;; Public implicit button types
40 ;;; ************************************************************************
41
42 (defib wais-smart ()
43 "Handles context-sensitive Smart Key in WAIS buffers."
44 (if (featurep 'wais)
45 (let ((b (buffer-name)))
46 (cond ((string-match ": Find Documents On\\|: Similar To" b)
47 (hact 'wais-smart 'wais-query))
48 ((equal "*Source List*" b)
49 (hact 'wais-smart 'source-menu-view))
50 ((string-match ": On Sources" b)
51 (hact 'wais-smart
52 (if (eobp) 'wais-view-source 'source-menu-view)))
53 ((string-match ": Results" b)
54 (hact 'wais-smart 'wais-edit))
55 ))))
56
57 ;;; ************************************************************************
58 ;;; Public button action types
59 ;;; ************************************************************************
60
61 (defact wais-ques (question-name)
62 "Loads a Wais Question QUESTION-NAME, displays it with WAIS Emacs interface."
63 (interactive "sWAIS Question name: ")
64 (if (or (featurep 'wais) (load "wais"))
65 (progn
66 (display-question question-name)
67 (wais)
68 (display-question question-name)
69 )
70 (error "(wais-ques): WAIS interface not available so can't load question.")
71 ))
72
73 (defact wais-smart (interactive-func)
74 "Performs INTERACTIVE-FUNC in a Wais buffer."
75 (call-interactively interactive-func))
76
77 (provide 'hsys-wais)