Mercurial > hg > xemacs-beta
comparison lisp/ilisp/ilisp-cmu.el @ 0:376386a54a3c r19-14
Import from CVS: tag r19-14
author | cvs |
---|---|
date | Mon, 13 Aug 2007 08:45:50 +0200 |
parents | |
children | b82b59fe008d |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:376386a54a3c |
---|---|
1 ;;; -*- Mode: Emacs-Lisp -*- | |
2 | |
3 ;;; ilisp-cmu.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 CMU Common Lisp dialect definition | |
25 ;;; | |
26 ;;;%%%CMULisp | |
27 | |
28 (defvar cmulisp-source-directory-regexp | |
29 "\\/afs\\/cs\\.cmu\\.edu\\/project\\/clisp\\/src\\/[0-9]*\\/" | |
30 "*Regexp to match cmulisp source code directory.") | |
31 | |
32 (defvar cmulisp-local-source-directory | |
33 nil | |
34 "*Where the cmulisp sources really are.") | |
35 | |
36 (defvar ilisp-cmulisp-init-file "cmulisp.lisp") | |
37 | |
38 (defun cmulisp-source-directory-fixup-function () | |
39 (if cmulisp-local-source-directory | |
40 (replace-match cmulisp-local-source-directory))) | |
41 | |
42 (defun cmulisp-check-prompt (old new) | |
43 "Compare the break level printed at the beginning of the prompt." | |
44 (let* ((was-in-break (and old (string-match "]+" old))) | |
45 (old-level (if was-in-break | |
46 (- (match-end 0) (match-beginning 0)) | |
47 0)) | |
48 (is-in-break (string-match "]+" new)) | |
49 (new-level (if is-in-break | |
50 (- (match-end 0) (match-beginning 0)) | |
51 0))) | |
52 (<= new-level old-level))) | |
53 | |
54 ;;; | |
55 (defdialect cmulisp "CMU Common LISP" | |
56 clisp | |
57 (ilisp-load-init 'cmu ilisp-cmulisp-init-file) | |
58 (if cmulisp-local-source-directory | |
59 (setq ilisp-source-directory-fixup-alist | |
60 (list | |
61 (cons cmulisp-source-directory-regexp | |
62 cmulisp-local-source-directory))) | |
63 (message "cmulisp-local-source-directory not set.")) | |
64 (setq comint-prompt-regexp "^\\([0-9]+\\]+\\|\\*\\) " | |
65 ilisp-trace-command "(ILISP:cmulisp-trace \"%s\" \"%s\" \"%s\")" | |
66 comint-prompt-status | |
67 (function (lambda (old line) | |
68 (comint-prompt-status old line 'cmulisp-check-prompt))) | |
69 | |
70 ilisp-error-regexp "ILISP:[^\"]*\\|Error [^\n]*\n\n" | |
71 ;; The above regexp has been suggested by | |
72 ;; hunter@work.nlm.nih.gov (Larry Hunter) | |
73 | |
74 ilisp-arglist-command "(ILISP:arglist \"%s\" \"%s\")" | |
75 | |
76 ilisp-find-source-command "(ILISP:source-file \"%s\" \"%s\" \"%s\")" | |
77 | |
78 comint-fix-error ":pop" | |
79 | |
80 comint-continue ":go" | |
81 | |
82 ilisp-reset ":q" | |
83 | |
84 comint-interrupt-regexp "Interrupted at" | |
85 | |
86 ilisp-binary-extension "sparcf")) |