-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathzwei-uranus-mode.lisp
55 lines (42 loc) · 1.75 KB
/
zwei-uranus-mode.lisp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
;;; -*- Mode: LISP; Package: ZWEI; Base: 8; Syntax: Common-lisp -*-
;;;
;;; Zwei mode definition for Uranus
(DEFFLAVOR URANUS-LANGUAGE-MIXIN () (LISP-SYNTAX-MIXIN))
(DEFMETHOD (:EVAL-PRINT-FUNCTION URANUS-LANGUAGE-MIXIN) ()
#'URANUS:toplevel-EXECUTE)
(DEFCOM COM-ReEVALUATE-AND-EXIT "ReEvaluates the buffer and return from top-level" ()
(LET ((URANUS:@RELOAD-DEFLIST NIL)
(URANUS:@RELOAD-FLAG T))
uranus:@reload-deflist
uranus:@reload-flag
(COM-EVALUATE-Uranus-AND-EXIT)))
(defun com-evaluate-uranus-and-exit ()
(let ((readtable uranus:uranus-readtable) ;for Rel-5
(si:standard-readtable uranus:uranus-readtable) ;for Rel-6
(scl:*readtable* uranus:uranus-readtable) ;for Rel-7
(uranus:@printlevel 5))
(com-evaluate-and-exit)))
(defun com-evaluate-uranus-region ()
(let ((readtable uranus:uranus-readtable) ;for Rel-5
(si:standard-readtable uranus:uranus-readtable) ;for Rel-6
(scl:*readtable* uranus:uranus-readtable) ;for Rel-7
(uranus:@printlevel 99))
(com-evaluate-region)))
(DEFMETHOD (:COMPILATION-SUPPORTED URANUS-LANGUAGE-MIXIN) () NIL)
(DEFMETHOD (:DEFAULT-SOURCE-FILE-TYPE URANUS-LANGUAGE-MIXIN) () :URA)
(DEFFLAVOR URANUS-MODE ()
(URANUS-LANGUAGE-MIXIN
LISP-SYNTAX-MODE-FORMS-MIXIN LISP-LANGUAGE-MIXIN MAJOR-MODE))
(DEFMETHOD (:MODE-FORMS URANUS-MODE) ()
`((SET-COMTAB *MODE-COMTAB* '(#\m-Z COM-EVALUATE-Uranus-AND-EXIT
#\c-m-Z COM-REEVALUATE-AND-EXIT
#\c-sh-E com-evaluate-Uranus-region
))))
(DEFMODE COM-URANUS-MODE URANUS-MODE "Sets things up for editing Uranus code."
:URANUS)
(SET-COMTAB *ZMACS-COMTAB*
()
(MAKE-COMMAND-ALIST '(COM-URANUS-MODE)))
(push '(:ura . :uranus) fs:*file-type-mode-alist*)
(push '(:uranus . :uranus) fs:*file-type-mode-alist*)
(fs:define-canonical-type :uranus "URA")