Initial Commit
[packages] / xemacs-packages / ilisp / ilisp-acl.el
1 ;;; -*- Mode: Emacs-Lisp -*-
2
3 ;;; ilisp-acl.el --
4 ;;; ILISP Allegro Common Lisp dialect definition
5 ;;;
6 ;;; Various patches provided by Kimball Collins
7 ;;; <kpc@ptolemy-ethernet.arc.nasa.gov>
8 ;;;
9 ;;;
10 ;;; This file is part of ILISP.
11 ;;; Please refer to the file COPYING for copyrights and licensing
12 ;;; information.
13 ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
14 ;;; of present and past contributors.
15 ;;;
16 ;;; $Id: ilisp-acl.el,v 1.3 2001-07-02 09:40:45 youngs Exp $
17
18
19 ;;;%%%Allegro
20 (defvar ilisp-allegro-init-file "allegro.lisp")
21
22 (defun allegro-check-prompt (old new)
23   "Compare the break level printed at the beginning of the prompt."
24   (let* ((old-level (if (and old (eq 1 (string-match "[0-9]+" old)))
25                         (string-to-int (substring old 1))
26                         0))
27          (new-level (if (eq 1 (string-match "[0-9]+" new))
28                         (string-to-int (substring new 1))
29                         0)))
30     (<= new-level old-level)))
31  
32 ;;;
33 (defdialect allegro "Allegro Common LISP"
34   common-lisp
35   (ilisp-load-init 'allegro ilisp-allegro-init-file)
36   (setq comint-fix-error ":pop"
37         ilisp-reset ":reset"
38         comint-continue ":cont"
39         comint-interrupt-regexp  "Error: [^\n]* interrupt\)")
40   (setq comint-prompt-status 
41         (function (lambda (old line)
42                     (comint-prompt-status old line 'allegro-check-prompt))))
43   ;; <cl> or package> at top-level
44   ;; [0-9c] <cl> or package> in error
45   ;; (setq comint-prompt-regexp "^\\(\\[[0-9]*c*\\] \\|\\)\\(<\\|\\)[^>]*> ")
46   ;; (setq comint-prompt-regexp "^\\(\\[[0-9]+i?c?\\] \\|\\[step\\]\\)?\\(<?[-A-Za-z]* ?[0-9]*?>\\|[-A-Za-z0-9]+([0-9]+):\\) ")
47
48   ;; Patch by kpc 94/8/30: allow prompts that look like this:
49   ;; USER(23): USER(23):
50   (setq comint-prompt-regexp "^\\(\\(\\[[0-9]+i?c?\\] \\|\\[step\\] \\)?\\(<?[-A-Za-z]* ?[0-9]*?>\\|[-A-Za-z0-9]+([0-9]+):\\) \\)+")
51    
52   (setq ilisp-error-regexp
53         "\\(ILISP:[^\"]*\\)\\|\\(Error:[^\n]*\\)\\|\\(Break:[^\n]*\\)")
54
55   (setq ilisp-source-types (append ilisp-source-types '(("any"))))
56
57   (setq ilisp-find-source-command 
58         "(ILISP:ilisp-source-files \"%s\" \"%s\" \"%s\")")
59
60   ;; Note:
61   ;; 19990920
62   ;; The global definition should now take care to find out the
63   ;; proper extension.  See file 'ilisp-cl.el'.
64   ;; (setq ilisp-binary-command "excl:*fasl-default-type*")
65
66   ;;(setq ilisp-init-binary-command
67   ;;    ;; Patch provided by kpc 94/8/30: distinguish among
68   ;;    ;; fasl-incompatible allegro versions
69   ;;    "(let ((ext (or #+m68k \"68fasl\"
70   ;;                    #+sparc \"sfasl\"
71   ;;                    #+iris4d \"ifasl\"
72   ;;                    #+dec3100 \"pfasl\"
73   ;;                    excl:*fasl-default-type*)))
74   ;;           #+allegro-v4.0 (setq ext (concatenate 'string ext \"40\"))
75   ;;           #+allegro-v4.1 (setq ext (concatenate 'string ext \"41\"))
76   ;;           #+allegro-v4.2 (setq ext (concatenate 'string ext \"42\"))
77   ;;           ext)")
78
79   ;; FI:CLMAN support
80
81   (setf ilisp-*use-fi-clman-interface-p* t)
82
83   ;; ILD Support
84
85   (setq ild-abort-string ":pop"
86         ild-continue-string ":cont"
87         ild-next-string ":dn"
88         ild-next-string-arg ":dn %s"
89         ild-previous-string ":up"
90         ild-previous-string-arg ":up %s"
91         ild-top-string ":to"
92         ild-bottom-string ":bo"
93         ild-backtrace-string ":bt"
94         ild-locals-string ":local"
95         ild-local-string-arg ":local %s"
96         ild-return-string nil           ;needs work
97         ild-retry-string ":rest"
98         ild-trap-on-exit-string ":boe")
99   )
100
101 (unless allegro-program (setq allegro-program "cl"))
102
103 ;;; end of file -- ilisp-acl.el --