annotate lisp/ilisp/ilisp-cmu.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children b82b59fe008d
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 ;;; -*- Mode: Emacs-Lisp -*-
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 ;;; ilisp-cmu.el --
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 ;;; This file is part of ILISP.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6 ;;; Version: 5.7
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8 ;;; Copyright (C) 1990, 1991, 1992, 1993 Chris McConnell
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 ;;; 1993, 1994 Ivan Vasquez
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 ;;; 1994, 1995 Marco Antoniotti and Rick Busdiecker
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 ;;; Other authors' names for which this Copyright notice also holds
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 ;;; may appear later in this file.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15 ;;; Send mail to 'ilisp-request@lehman.com' to be included in the
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 ;;; ILISP mailing list. 'ilisp@lehman.com' is the general ILISP
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 ;;; mailing list were bugs and improvements are discussed.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 ;;; ILISP is freely redistributable under the terms found in the file
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 ;;; COPYING.
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24 ;;; ILISP CMU Common Lisp dialect definition
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 ;;;%%%CMULisp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 (defvar cmulisp-source-directory-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 "\\/afs\\/cs\\.cmu\\.edu\\/project\\/clisp\\/src\\/[0-9]*\\/"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30 "*Regexp to match cmulisp source code directory.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32 (defvar cmulisp-local-source-directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 nil
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 "*Where the cmulisp sources really are.")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 (defvar ilisp-cmulisp-init-file "cmulisp.lisp")
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 (defun cmulisp-source-directory-fixup-function ()
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39 (if cmulisp-local-source-directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 (replace-match cmulisp-local-source-directory)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 (defun cmulisp-check-prompt (old new)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43 "Compare the break level printed at the beginning of the prompt."
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 (let* ((was-in-break (and old (string-match "]+" old)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 (old-level (if was-in-break
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 (- (match-end 0) (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 (is-in-break (string-match "]+" new))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 (new-level (if is-in-break
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 (- (match-end 0) (match-beginning 0))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
51 0)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
52 (<= new-level old-level)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
53
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
54 ;;;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
55 (defdialect cmulisp "CMU Common LISP"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
56 clisp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
57 (ilisp-load-init 'cmu ilisp-cmulisp-init-file)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
58 (if cmulisp-local-source-directory
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
59 (setq ilisp-source-directory-fixup-alist
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
60 (list
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
61 (cons cmulisp-source-directory-regexp
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
62 cmulisp-local-source-directory)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
63 (message "cmulisp-local-source-directory not set."))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
64 (setq comint-prompt-regexp "^\\([0-9]+\\]+\\|\\*\\) "
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
65 ilisp-trace-command "(ILISP:cmulisp-trace \"%s\" \"%s\" \"%s\")"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
66 comint-prompt-status
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
67 (function (lambda (old line)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
68 (comint-prompt-status old line 'cmulisp-check-prompt)))
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
69
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
70 ilisp-error-regexp "ILISP:[^\"]*\\|Error [^\n]*\n\n"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
71 ;; The above regexp has been suggested by
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
72 ;; hunter@work.nlm.nih.gov (Larry Hunter)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
73
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
74 ilisp-arglist-command "(ILISP:arglist \"%s\" \"%s\")"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
75
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
76 ilisp-find-source-command "(ILISP:source-file \"%s\" \"%s\" \"%s\")"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
77
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
78 comint-fix-error ":pop"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
79
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
80 comint-continue ":go"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
81
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
82 ilisp-reset ":q"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
83
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
84 comint-interrupt-regexp "Interrupted at"
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
85
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
86 ilisp-binary-extension "sparcf"))