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-w3.el < prev    next >
Encoding:
Text File  |  1995-04-17  |  2.5 KB  |  70 lines

  1. ;;!emacs
  2. ;;
  3. ;; FILE:         hsys-w3.el
  4. ;; SUMMARY:      Hyperbole support for Emacs W3 World-Wide Web (WWW) browsing.
  5. ;; USAGE:        GNU Emacs Lisp Library
  6. ;; KEYWORDS:     comm, help, hypermedia
  7. ;;
  8. ;; AUTHOR:       Bob Weiner
  9. ;; ORG:          Motorola Inc.
  10. ;;
  11. ;; ORIG-DATE:     7-Apr-94 at 17:17:39 by Bob Weiner
  12. ;; LAST-MOD:     14-Apr-95 at 16:08:59 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) 1994-1995, Free Software Foundation, Inc.
  18. ;; Developed with support from Motorola Inc.
  19. ;;
  20. ;; DESCRIPTION:  
  21. ;;
  22. ;;   This module defines an implicit button type and associated action and
  23. ;;   help types.  A press of the Action Key on a unified resource locator
  24. ;;   (URL) displays the referent for the URL.  A press of the Help Key on a
  25. ;;   URL displays a history list of previously browsed WWW documents.  Press
  26. ;;   the Action Key on any item from the history list to display it.
  27. ;;
  28. ;;   This requires the Emacs W3 World-Wide-Web browser available from:
  29. ;;     "/anonymous@cs.indiana.edu:/pub/elisp/w3".
  30. ;;
  31. ;;   It assumes that you have set up to have w3 auto-loaded according to the
  32. ;;   setup instructions included with W3.  Specifically,
  33. ;;   'w3-follow-url-at-point' should be autoloaded.
  34. ;;
  35. ;; DESCRIP-END.
  36.  
  37. ;;; ************************************************************************
  38. ;;; Other required Elisp libraries
  39. ;;; ************************************************************************
  40.  
  41. ;;; Requires 'w3' libraries.
  42.  
  43. ;;; ************************************************************************
  44. ;;; Public variables
  45. ;;; ************************************************************************
  46.  
  47. (defib hw3:link-follow ()
  48.   "When not in a w3 buffer, follow any url (link) at point."
  49.   (if (not (eq major-mode 'w3-mode))
  50.       (let ((link-and-pos (hpath:www-at-p t)))
  51.     (if link-and-pos
  52.         (progn (ibut:label-set link-and-pos)
  53.            (hact 'hw3:link-follow (car link-and-pos)))))))
  54.  
  55. (defact hw3:link-follow (link-label)
  56.   "Follows a link given by LINK-LABEL."
  57.   (interactive "sURL to follow: ")
  58.   (or (stringp link-label)
  59.       (error "(hw3:link-follow): Link label must be given as a string."))
  60.   (w3-fetch link-label))
  61.  
  62. (defun hw3:link-follow:help (&optional but)
  63.   "Displays history list of www nodes previously visited."
  64.   (interactive)
  65.   (if (fboundp 'w3-show-history-list)
  66.       (hact 'w3-show-history-list)
  67.     (hact 'error "(hw3:link-follow:help): W3 must be loaded to display WWW history")))
  68.  
  69. (provide 'hsys-w3)
  70.