annotate lisp/hyperbole/hsys-wais.el @ 111:164ab62060bf

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