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 / ilisp / ilisp-hlw.el < prev    next >
Encoding:
Text File  |  1995-01-26  |  2.6 KB  |  78 lines

  1. ;;; -*- Mode: Emacs-Lisp -*-
  2.  
  3. ;;; ilisp-hlw.el --
  4.  
  5. ;;; This file is part of ILISP.
  6. ;;; Version: 5.7
  7. ;;;
  8. ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
  9. ;;;               1993, 1994 Ivan Vasquez
  10. ;;;               1994, 1995 Marco Antoniotti and Rick Busdiecker
  11. ;;;
  12. ;;; Other authors' names for which this Copyright notice also holds
  13. ;;; may appear later in this file.
  14. ;;;
  15. ;;; Send mail to 'ilisp-request@lehman.com' to be included in the
  16. ;;; ILISP mailing list. 'ilisp@lehman.com' is the general ILISP
  17. ;;; mailing list were bugs and improvements are discussed.
  18. ;;;
  19. ;;; ILISP is freely redistributable under the terms found in the file
  20. ;;; COPYING.
  21.  
  22.  
  23. ;;;
  24. ;;; ILISP LispWorks Common Lisp dialect definition
  25. ;;;
  26. ;;; Independently written by:
  27. ;;;
  28. ;;; Jason Trenouth: jason@harlequin.co.uk
  29. ;;; Qiegang Long: qlong@cs.umass.edu
  30. ;;;
  31. ;;; and later merged together by Jason
  32. ;;;
  33.  
  34. (defvar ilisp-lispworks-init-file "lispworks.lisp")
  35.  
  36. ;; may use Qiegang's instead? "[-A-Z]+ [0-9]+ : \\([0-9]+\\) >"
  37.  
  38. (defun lispworks-break-level (prompt)
  39.   (let ((position nil))
  40.     (if (and prompt (setq position (string-match ": [0-9]+" prompt)))
  41.     (string-to-int (substring prompt (+ 2 position)))
  42.       0)))
  43.  
  44. (defun lispworks-check-prompt (old new)
  45.   "Compare the break level printed at the beginning of the prompt."
  46.   (<= (lispworks-break-level new) (lispworks-break-level old)))
  47.  
  48. ;; Qiegang's prompt matcher "^\\([-A-Z]+ [0-9]+ >\\)\\|\\([-A-Z]+ [0-9]+ : [0-9]+ >\\) "
  49. ;; Qiegang's error matcher "\\(ILISP:[^\"]*\\)\\|\\(Error: [^\n]*\\)\\|\\(Break.[^\n]*\\)"
  50.  
  51. (defdialect lispworks "LispWorks"
  52.   clisp
  53.   (ilisp-load-init 'lispworks ilisp-lispworks-init-file)
  54.   (setq comint-fix-error ":a"
  55.     ilisp-reset ":a" ;; LW doesn't have a multi-level abort yet
  56.     comint-continue ":c"
  57.     comint-interrupt-regexp  "Break.\n.*")
  58.   (setq comint-prompt-status 
  59.     (function (lambda (old line)
  60.       (comint-prompt-status old line 'lispworks-check-prompt))))
  61.   ;; <cl> or package> at top-level
  62.   ;; [0-9c] <cl> or package> in error
  63.   ;; (setq comint-prompt-regexp "^\\(\\[[0-9]*c*\\] \\|\\)\\(<\\|\\)[^>]*> ")
  64.   (setq comint-prompt-regexp "^[A-Z=][-a-z0-9A-Z:= ]*[$%#>]+ *") 
  65.   (setq ilisp-error-regexp "ILISP [0-9]* : [0-9]* > ")
  66.   (setq ilisp-binary-command "system::*binary-file-type*")
  67.   (setq ilisp-source-types (append ilisp-source-types '(("any"))))
  68.   (setq ilisp-directory-command "(lw:current-pathname)")
  69.   (setq ilisp-set-directory-command "(lw:change-directory \"%s\")")
  70.   (setq ilisp-find-source-command 
  71.     "(ILISP:ilisp-source-files \"%s\" \"%s\" \"%s\")")
  72.   (setq ilisp-init-binary-command 
  73.     "system::*binary-file-type*"))
  74.   
  75. (if (not lispworks-program) (setq lispworks-program "lispworks"))
  76.  
  77. (provide 'ilisp-lw)
  78.