1 ;;; hsys-wais.el --- Hyperbole support for WAIS browsing.
3 ;; Copyright (C) 1991, 1995 Free Software Foundation, Inc.
4 ;; Developed with support from Motorola Inc.
6 ;; Author: Bob Weiner, Brown U.
7 ;; Maintainer: Mats Lidell <matsl@contactor.se>
8 ;; Keywords: comm, help, hypermedia
10 ;; This file is part of GNU Hyperbole.
12 ;; GNU Hyperbole is free software; you can redistribute it and/or
13 ;; modify it under the terms of the GNU General Public License as
14 ;; published by the Free Software Foundation; either version 3, or (at
15 ;; your option) any later version.
17 ;; GNU Hyperbole is distributed in the hope that it will be useful,
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 ;; General Public License for more details.
22 ;; You should have received a copy of the GNU General Public License
23 ;; along with GNU Emacs; see the file COPYING. If not, write to the
24 ;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25 ;; Boston, MA 02110-1301, USA.
29 ;; For information on WAIS, see ftp://ftp.wais.com:/pub/.
30 ;; The freeware/ subdirectory there contains free source code to support
31 ;; WAIS on most standard architectures.
37 ;;; Other required Elisp libraries
41 (autoload 'wais "wais" "Client-server full-text retrieval" t)
42 (autoload 'waisd-mode "wais" "Wide Area Information Services" t)
43 (autoload 'wais-select-question "wais" "Select a new WAIS question." t)
44 (autoload 'wais-create-question "wais" "Create a new WAIS question." t)
47 ;;; Public implicit button types
51 "Handles context-sensitive Smart Key in WAIS buffers."
53 (let ((b (buffer-name)))
54 (cond ((string-match ": Find Documents On\\|: Similar To" b)
55 (hact 'wais-smart 'wais-query))
56 ((equal "*Source List*" b)
57 (hact 'wais-smart 'source-menu-view))
58 ((string-match ": On Sources" b)
60 (if (eobp) 'wais-view-source 'source-menu-view)))
61 ((string-match ": Results" b)
62 (hact 'wais-smart 'wais-edit))
66 ;;; Public button action types
69 (defact wais-ques (question-name)
70 "Loads a Wais Question QUESTION-NAME, displays it with WAIS Emacs interface."
71 (interactive "sWAIS Question name: ")
72 (if (or (featurep 'wais) (load "wais"))
74 (display-question question-name)
76 (display-question question-name)
78 (error "(wais-ques): WAIS interface not available so can't load question.")
81 (defact wais-smart (interactive-func)
82 "Performs INTERACTIVE-FUNC in a Wais buffer."
83 (call-interactively interactive-func))
87 ;;; hsys-wais.el ends here