home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / CLIPPER / MISC / MENUSPCS.ZIP / PATCH.S < prev    next >
Encoding:
Text File  |  1987-12-29  |  2.2 KB  |  55 lines

  1. ;;; ------------------------------------------------------------
  2. ;;; PC SCHEME START-UP FILE -- COMPILE AND CONVERT TO PATCH.PCS
  3. ;;; ------------------------------------------------------------
  4. ;;; An example of a PC Scheme patch file for use with Menus for
  5. ;;; Scheme (tm)
  6.  
  7. ;;; ------------------------------------------------------------
  8. ;;; Modifed Error Handler
  9.  
  10. ;;; Suppresses the inspector when PC Scheme is not in debug
  11. ;;; mode.  Author's note: I have found this simple modification
  12. ;;; to the error handler reduces my irritation with the TI
  13. ;;; version so much that I want to share it with all PC Scheme
  14. ;;; programmers.  -- M. Goldberg
  15. (define (*user-error-handler* code
  16.                               message
  17.                               irritant
  18.                               sys-error-handler)
  19.   (if pcs-debug-mode
  20.     (sys-error-handler)
  21.     (begin
  22.       (writeln "ERROR: " message)
  23.       (writeln "CAUSED BY: " irritant)
  24.       (reset))))
  25.  
  26. ;;; ------------------------------------------------------------
  27. ;;; Menu-Based User Interface Loader
  28.  
  29. ;;; If the predicates mouse? is set to #f, MENKEY.FSL is loaded.
  30. ;;; Otherwise, MENMOU.FSL is loaded.  If the predicate xed? is
  31. ;;; NOT #f, MENED.FSL is loaded.
  32. (let ((mouse? #f)
  33.       (xed? #f))
  34.   (fast-load (string-append pcs-sysdir "\\SCOOPS.FSL"))
  35.   (fast-load (string-append pcs-sysdir "\\MENUS.FSL"))
  36.   (if mouse?
  37.     ;; Load the mouse-driven top-level for the menu-based user
  38.     ;; interface.
  39.     (fast-load (string-append pcs-sysdir "\\MENMOU.FSL"))
  40.     ;; Load the keyboard-driven top-level for the menu-based
  41.     ;; user interface.
  42.     (fast-load (string-append pcs-sysdir "\\MENKEY.FSL")))
  43.   (fast-load (string-append pcs-sysdir "\\MENLD.FSL"))
  44.   (fast-load (string-append pcs-sysdir "\\MENCO.FSL"))
  45.   (fast-load (string-append pcs-sysdir "\\MENDOS.FSL"))
  46.   (if xed?
  47.     ;; Load the external editor menu module.
  48.     (fast-load (string-append pcs-sysdir "\\MENED.FSL")))
  49.   (if mouse?
  50.     ;; Set the console window attributes to agree with what is
  51.     ;; specified by the mouse menu "Clear Screen" item.
  52.     (clr-console)))
  53.  
  54. ;;; ------------------------------------------------------------
  55.