home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 2: Applications / Linux Cubed Series 2 - Applications.iso / editors / emacs / xemacs / xemacs-1.006 / xemacs-1 / lib / xemacs-19.13 / lisp / hyperbole / hsys-wais.el < prev    next >
Encoding:
Text File  |  1995-05-20  |  2.5 KB  |  73 lines

  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:     14-Apr-95 at 16:09:15 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. ;; DESCRIP-END.
  22.  
  23. ;;; ************************************************************************
  24. ;;; Other required Elisp libraries
  25. ;;; ************************************************************************
  26.  
  27. ;; Autoload wais.
  28. (autoload 'wais              "wais" "Client-server full-text retrieval"  t)
  29. (autoload 'waisd-mode        "wais" "Wide Area Information Services"     t)
  30. (autoload 'wais-select-question "wais" "Select a new WAIS question."     t)
  31. (autoload 'wais-create-question "wais" "Create a new WAIS question."     t)
  32.  
  33. ;;; ************************************************************************
  34. ;;; Public implicit button types
  35. ;;; ************************************************************************
  36.  
  37. (defib wais-smart ()
  38.   "Handles context-sensitive Smart Key in WAIS buffers."
  39.   (if (featurep 'wais)
  40.       (let ((b (buffer-name)))
  41.     (cond ((string-match ": Find Documents On\\|: Similar To" b)
  42.            (hact 'wais-smart 'wais-query))
  43.           ((equal "*Source List*" b)
  44.            (hact 'wais-smart 'source-menu-view))
  45.           ((string-match ": On Sources" b)
  46.            (hact 'wais-smart
  47.              (if (eobp) 'wais-view-source 'source-menu-view)))
  48.           ((string-match ": Results" b)
  49.            (hact 'wais-smart 'wais-edit))
  50.           ))))
  51.  
  52. ;;; ************************************************************************
  53. ;;; Public button action types
  54. ;;; ************************************************************************
  55.  
  56. (defact wais-ques (question-name)
  57.   "Loads a Wais Question QUESTION-NAME, displays it with WAIS Emacs interface."
  58.   (interactive "sWAIS Question name: ")
  59.   (if (or (featurep 'wais) (load "wais"))
  60.       (progn
  61.     (display-question question-name)
  62.     (wais)
  63.     (display-question question-name)
  64.     )
  65.     (error "(wais-ques): WAIS interface not available so can't load question.")
  66.     ))
  67.  
  68. (defact wais-smart (interactive-func)
  69.   "Performs INTERACTIVE-FUNC in a Wais buffer."
  70.   (call-interactively interactive-func))
  71.  
  72. (provide 'hsys-wais)
  73.