1 ;;; -*- Mode: Emacs-Lisp -*-
4 ;;; CLISP Common Lisp by Bruno Haible and Michael Stoll dialect definition.
6 ;;; This file is part of ILISP.
7 ;;; Please refer to the file COPYING for copyrights and licensing
9 ;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
10 ;;; of present and past contributors.
12 ;;; $Id: ilisp-chs.el,v 1.4 2002-06-03 23:36:59 wbd Exp $
16 ;;; clisp-hs-check-prompt doesn't after the first break because the
17 ;;; number of ">" characters doesn't increase.
19 ;;; (defun clisp-hs-check-prompt (old new)
20 ;;; "Compare the break level printed at the beginning of the prompt."
21 ;;; (let* ((was-in-break (and old (string-match "Break>" old)))
22 ;;; (old-level (if was-in-break
23 ;;; (- (match-end 0) (match-beginning 0))
25 ;;; (is-in-break (string-match "Break>" new))
26 ;;; (new-level (if is-in-break
27 ;;; (- (match-end 0) (match-beginning 0))
29 ;;; (<= new-level old-level)))
31 ;;; clisp-hs-check-prompt -- New version
32 ;;; (according to the description in comint-ipc, this should be the
35 ;;; 19990912 Martin Atzmuller
37 (defun clisp-hs-check-prompt (old new)
38 "Compare the break level printed at the beginning of the prompt."
39 (let* ((was-in (and old
40 (string-match "Break" old)
41 (string-match "[0-9]+" old)))
44 (substring old (match-beginning 0)
48 (string-match "Break" new)
49 (string-match "[0-9]+" new)))
52 (substring new (match-beginning 0)
55 (<= new-level old-level)))
61 ;;; 19991219 Martin Atzmueller
62 ;;; replaced clisp-hs-check-prompt again.
64 ;;; 19990912 Martin Atzmueller
65 ;;; replaced clisp-hs-check-prompt with new function
67 ;;; 19990828 Paolo Amoroso
68 ;;; Added initial support for ILD and modified COMINT-PROMPT-REGEXP (the
69 ;;; previous value didn't take into account the space which is the last
70 ;;; character of the prompt).
72 ;;; 19990806 Martin Atzmueller
73 ;;; Various changes to make the dialect definition friendlier.
75 ;;; 19990806 Marco Antoniotti
76 ;;; Since I changed the name of the main dialect, I could conceivably
77 ;;; change the name of the CLISP dialect.
79 (defvar ilisp-clisp-hs-init-file "cl-chs-init.lisp")
81 (defdialect clisp-hs "CLISP H.S." common-lisp
82 (ilisp-load-init 'clisp-hs ilisp-clisp-hs-init-file)
84 ilisp-load-or-send-command "(and (or (print \"%s\") t) (load \"%s\"))"
86 "\\(ILISP:[^\"]*\\)\\|\\(\\*\\*[^\n]*\\)"
88 ilisp-reset "(sys::debug-unwind)"
89 ilisp-block-command "(progn %s)"
90 ilisp-find-source-command nil
91 ilisp-callers-command nil
95 ;; The global definition should now take care to find out the
96 ;; proper extension. See file 'ilisp-cl.el'.
97 ;; ilisp-binary-extension "fas"
99 comint-prompt-regexp "^\\([0-9]+\\. Break \\[[0-9]+\\]> \\|[^>]*> \\)"
100 comint-interrupt-regexp "\\(\\*\\*\\* - [A-Za-z]*: User break\\)"
101 comint-fix-error "(sys::debug-unwind)"
102 comint-continue "continue"
106 (comint-prompt-status old line 'clisp-hs-check-prompt))))
108 ;; ILD Support. NIL values mean that more work is needed or that the
109 ;; particular command is not available
111 (setq ild-abort-string "(sys::debug-unwind)"
112 ild-continue-string "continue"
114 ild-next-string-arg nil
115 ild-previous-string "down"
116 ild-previous-string-arg nil
118 ild-bottom-string "bottom"
119 ild-backtrace-string "backtrace"
120 ild-locals-string nil
121 ild-local-string-arg nil
122 ild-return-string "return"
123 ild-retry-string "redo"
124 ild-trap-on-exit-string "break+" ; I'm not sure about this
127 (unless clisp-hs-program
128 (setq clisp-hs-program "clisp -ansi -I")) ; ANSI mode, ILISP friendly
132 ;;; end of file -- ilisp-chs.el --