1996-09-27 06:29:02 -04:00
|
|
|
|
;;;;
|
|
|
|
|
;;;; Help management
|
|
|
|
|
;;;;
|
1998-04-10 06:59:06 -04:00
|
|
|
|
;;;; Copyright <20> 1993-1998 Erick Gallesio - I3S-CNRS/ESSI <eg@unice.fr>
|
1996-09-27 06:29:02 -04:00
|
|
|
|
;;;;
|
|
|
|
|
;;;; Permission to use, copy, and/or distribute this software and its
|
|
|
|
|
;;;; documentation for any purpose and without fee is hereby granted, provided
|
|
|
|
|
;;;; that both the above copyright notice and this permission notice appear in
|
|
|
|
|
;;;; all copies and derived works. Fees for distribution or use of this
|
|
|
|
|
;;;; software or derived works may only be charged with express written
|
|
|
|
|
;;;; permission of the copyright holder.
|
|
|
|
|
;;;; This software is provided ``as is'' without express or implied warranty.
|
|
|
|
|
;;;;
|
|
|
|
|
;;;; Author: Erick Gallesio [eg@unice.fr]
|
|
|
|
|
;;;; Creation date: 14-Sep-1993 13:30
|
1998-06-09 07:07:40 -04:00
|
|
|
|
;;;; Last file update: 28-May-1998 19:10
|
1996-09-27 06:29:02 -04:00
|
|
|
|
;;;;
|
|
|
|
|
|
1998-04-10 06:59:06 -04:00
|
|
|
|
(require "www-browser")
|
1996-09-27 06:29:02 -04:00
|
|
|
|
|
1998-06-09 07:07:40 -04:00
|
|
|
|
(select-module STk)
|
|
|
|
|
|
1996-09-27 06:29:02 -04:00
|
|
|
|
(define (STk:show-help-file name)
|
|
|
|
|
;; Show the file (after having found the Help directory)
|
|
|
|
|
(let loop ((l *help-path*))
|
|
|
|
|
(if (null? l)
|
|
|
|
|
(error "Cannot find help file ~S" name)
|
1998-04-10 06:59:06 -04:00
|
|
|
|
(let* ((f (string-append (car l) "/" name))
|
1996-09-27 06:29:02 -04:00
|
|
|
|
(fd (open-file f "r")))
|
1998-04-10 06:59:06 -04:00
|
|
|
|
(catch (close-port fd))
|
1996-09-27 06:29:02 -04:00
|
|
|
|
(if fd
|
1998-06-09 07:07:40 -04:00
|
|
|
|
(www:browser :url f)
|
1996-09-27 06:29:02 -04:00
|
|
|
|
(loop (cdr l)))))))
|
|
|
|
|
|
|
|
|
|
(define (help . arg)
|
|
|
|
|
(if (null? arg)
|
|
|
|
|
(STk:show-help-file "STk-hlp.html")
|
1998-04-10 06:59:06 -04:00
|
|
|
|
(STk:show-help-file (format #f "~A.n.html" (car arg))))
|
|
|
|
|
#f)
|
1998-06-09 07:07:40 -04:00
|
|
|
|
|
1998-04-10 06:59:06 -04:00
|
|
|
|
(provide "help")
|