blob: 707bf71a484d700a5b9aafa63fb21fbab6164732 (
plain)
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
|
Author: Stelian Ionescu <sionescu@common-lisp.net>
Date: 2007-07-04
Status: Pending
Description: Fix a few glitches in slime-indentation contrib
diff --git a/contrib/slime-indentation.el b/contrib/slime-indentation.el
index e486937..6b76736 100644
--- a/contrib/slime-indentation.el
+++ b/contrib/slime-indentation.el
@@ -1031,27 +1031,32 @@ stored."
(mapcar #'define-cl-indent
'((block 1)
- (case (4 &rest (&whole 2 &rest 3)))
+ (case (4 &rest (&whole 2 &rest 1)))
(ccase . case) (ecase . case)
(typecase . case) (etypecase . case) (ctypecase . case)
- (handler-bind . let)
- (handler-case (4 &rest (&whole 2 4 &rest 2)))
(catch 1)
(cond cl-indent:indent-cond)
(defvar (4 2 2))
- (defconstant . defvar) (defparameter . defvar)
- (defclass (6 6 (&whole 2 &rest 1) &rest 2))
- (define-modify-macro
- (4 &body))
+ (defconstant . defvar)
+ (defparameter . defvar)
+ (defclass (6 4 (&whole 2 &rest 1) &rest (&whole 2 &rest 2)))
+ ;; needed because otherwise :DEFAULT-INITARGS is indented
+ ;; like DEF* macros: 4 4 &body
+ (:default-initargs (&rest 2))
+ (define-condition . defclass)
+ (define-modify-macro (4 (&whole 4 &rest 1) &body))
(defsetf (4 (&whole 4 &rest 1) 4 &body))
(defun (4 (&whole 4 &rest 1) &body))
- (defmacro . defun) (define-setf-method . defun) (deftype . defun)
- (defgeneric cl-indent:indent-defgeneric)
+ (define-setf-method . defun)
+ (define-setf-expander . defun)
+ (defmacro . defun) (deftype . defun)
+ (defgeneric cl-indent:indent-defgeneric)
+ (:method ((&whole 4 &rest 1) &body)) ; in `defgeneric'
(defmethod cl-indent:indent-defmethod)
+ (defpackage (4 2))
(defstruct ((&whole 4 &rest (&whole 2 &rest 1))
&rest (&whole 2 &rest 1)))
- (destructuring-bind
- ((&whole 6 &rest 1) 4 &body))
+ (destructuring-bind ((&whole 6 &rest 1) 4 &body))
(do ((&whole 4 &rest (&whole 1 &rest 2)) ; ((arg step incr))
(&whole 4 &rest 3) ; result: ((condition) (form) ...)
&rest cl-indent:indent-do))
@@ -1062,27 +1067,25 @@ stored."
(dolist ((&whole 4 2 1) &body))
(dotimes . dolist)
(eval-when 1)
- (flet ((&whole 4 &rest (&whole 1 (&whole 4 &rest 1) &body))
- &body))
+ (flet ((&whole 4 &rest (&whole 1 (&whole 4 &rest 1) &body)) &body))
(labels . flet) (macrolet . flet)
+ (handler-case (4 &rest (&whole 2 4 &rest 2)))
(if (&rest 4))
;; FIXME: Which of those do I really want?
;; (lambda ((&whole 4 &rest 1) &body))
- (lambda ((&whole 4 &rest 1)
- &rest cl-indent:indent-function-lambda-hack))
+ (lambda ((&whole 4 &rest 1) &rest cl-indent:indent-function-lambda-hack))
(let ((&whole 4 &rest (&whole 1 1 2)) &body))
(let* . let) (compiler-let . let)
+ (handler-bind . let) (restart-bind . let)
(locally 1)
(loop cl-indent::indent-loop-macro)
- (multiple-value-bind
- ((&whole 6 &rest 1) 4 &body))
- (multiple-value-call
- (4 &body))
+ (multiple-value-bind ((&whole 6 &rest 1) 4 &body))
+ (multiple-value-call (4 &body))
(multiple-value-list 1)
(multiple-value-prog1 1)
- (multiple-value-setq
- (4 2))
- (print-unreadable-object 1)
+ (multiple-value-setq (4 2))
+ (multiple-value-setf . multiple-value-setq)
+ (print-unreadable-object ((&whole 4 1 &rest 1) &body))
;; Combines the worst features of BLOCK, LET and TAGBODY
(prog ((&whole 4 &rest 1) &rest cl-indent:indent-tagbody))
(prog* . prog)
@@ -1093,14 +1096,15 @@ stored."
(restart-case . handler-case)
(return 0)
(return-from (nil &body))
+ (symbol-macrolet . let)
(tagbody cl-indent:indent-tagbody)
(throw 1)
(unless 1)
- (unwind-protect
- (5 &body))
+ (unwind-protect (5 &body))
(values 0)
(when 1)
- (with-accessors (6 4 &body))
+ (with-accessors . multiple-value-bind)
+ (with-condition-restarts . multiple-value-bind)
(with-compilation-unit (4 &body))
(with-hash-table-iterator (4 &body))
(with-output-to-string (4 &body))
@@ -1109,7 +1113,8 @@ stored."
(with-open-stream . with-open-file)
(with-package-iterator (4 &body))
(with-simple-restart (4 &body))
- (with-slots (6 4 &body))))
+ (with-slots . multiple-value-bind)
+ (with-standard-io-syntax (2))))
;; OK, we're almost finished.
;;
|