forked from lem-project/lem
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patherrors.lisp
More file actions
37 lines (30 loc) · 1.03 KB
/
Copy patherrors.lisp
File metadata and controls
37 lines (30 loc) · 1.03 KB
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
(in-package :lem-core)
(defparameter *default-editor-abort-message* "Abort")
(define-condition editor-abort (editor-condition)
((message
:initarg :message
:initform *default-editor-abort-message*
:reader editor-abort-message))
(:report
(lambda (condition stream)
(when (editor-abort-message condition)
(princ (editor-abort-message condition) stream)))))
(define-condition exit-editor ()
((report :initarg :report
:reader exit-editor-report)))
(define-condition undefined-key-error (editor-error)
()
(:report (lambda (c s)
(declare (ignore c))
(format s
"Key not found: ~A"
(keyseq-to-string (last-read-key-sequence))))))
(define-condition move-cursor-error (editor-error)
((point :initarg :point
:reader move-cursor-error-point)))
(define-condition end-of-buffer (move-cursor-error)
()
(:default-initargs :message nil))
(define-condition beginning-of-buffer (move-cursor-error)
()
(:default-initargs :message nil))