annotate lisp/ilisp/ilisp-hlw.el @ 164:4e0740e5aab2

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