2005-08-06 Michael Kifer <kifer@cs.stonybrook.edu>
[bpt/emacs.git] / lisp / emacs-lisp / cl-indent.el
CommitLineData
c0274f38
ER
1;;; cl-indent.el --- enhanced lisp-indent mode
2
59e0f579 3;; Copyright (C) 1987, 2000, 2001, 2002 Free Software Foundation, Inc.
e41b2db1 4
a7acbbe4 5;; Author: Richard Mlynarik <mly@eddie.mit.edu>
e41b2db1 6;; Created: July 1987
e5167999 7;; Maintainer: FSF
fd7fa35a 8;; Keywords: lisp, tools
e5167999 9
745bc783
JB
10;; This file is part of GNU Emacs.
11
12;; GNU Emacs is free software; you can redistribute it and/or modify
13;; it under the terms of the GNU General Public License as published by
e5167999 14;; the Free Software Foundation; either version 2, or (at your option)
745bc783
JB
15;; any later version.
16
17;; GNU Emacs is distributed in the hope that it will be useful,
18;; but WITHOUT ANY WARRANTY; without even the implied warranty of
19;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20;; GNU General Public License for more details.
21
22;; You should have received a copy of the GNU General Public License
b578f267 23;; along with GNU Emacs; see the file COPYING. If not, write to the
3a35cf56
LK
24;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
25;; Boston, MA 02110-1301, USA.
745bc783 26
e5167999
ER
27;;; Commentary:
28
e41b2db1
ER
29;; This package supplies a single entry point, common-lisp-indent-function,
30;; which performs indentation in the preferred style for Common Lisp code.
31;; To enable it:
32;;
33;; (setq lisp-indent-function 'common-lisp-indent-function)
34
745bc783
JB
35;;>> TODO
36;; :foo
37;; bar
38;; :baz
39;; zap
40;; &key (like &body)??
41
42;; &rest 1 in lambda-lists doesn't work
43;; -- really want (foo bar
44;; baz)
45;; not (foo bar
46;; baz)
47;; Need something better than &rest for such cases
48
e5167999 49;;; Code:
745bc783 50
fcad5199 51(defgroup lisp-indent nil
ec0421f3 52 "Indentation in Lisp."
fcad5199
RS
53 :group 'lisp)
54
55
56(defcustom lisp-indent-maximum-backtracking 3
745bc783 57 "*Maximum depth to backtrack out from a sublist for structured indentation.
ec0421f3 58If this variable is 0, no backtracking will occur and forms such as `flet'
fcad5199
RS
59may not be correctly indented."
60 :type 'integer
61 :group 'lisp-indent)
745bc783 62
fcad5199 63(defcustom lisp-tag-indentation 1
745bc783 64 "*Indentation of tags relative to containing list.
fcad5199
RS
65This variable is used by the function `lisp-indent-tagbody'."
66 :type 'integer
67 :group 'lisp-indent)
745bc783 68
fcad5199 69(defcustom lisp-tag-body-indentation 3
745bc783
JB
70 "*Indentation of non-tagged lines relative to containing list.
71This variable is used by the function `lisp-indent-tagbody' to indent normal
72lines (lines without tags).
73The indentation is relative to the indentation of the parenthesis enclosing
74the special form. If the value is t, the body of tags will be indented
75as a block at the same indentation as the first s-expression following
76the tag. In this case, any forms before the first tag are indented
fcad5199
RS
77by `lisp-body-indent'."
78 :type 'integer
79 :group 'lisp-indent)
745bc783 80
59e0f579
GM
81(defcustom lisp-backquote-indentation t
82 "*Whether or not to indent backquoted lists as code.
83If nil, indent backquoted lists as data, i.e., like quoted lists."
84 :type 'boolean
85 :group 'lisp-indent)
86
87
88(defcustom lisp-loop-keyword-indentation 3
89 "*Indentation of loop keywords in extended loop forms."
90 :type 'integer
91 :group 'lisp-indent)
92
93
94(defcustom lisp-loop-forms-indentation 5
95 "*Indentation of forms in extended loop forms."
96 :type 'integer
97 :group 'lisp-indent)
98
99
100(defcustom lisp-simple-loop-indentation 3
101 "*Indentation of forms in simple loop forms."
102 :type 'integer
103 :group 'lisp-indent)
104
745bc783 105\f
bf92b5a4 106(defvar lisp-indent-error-function)
bbf1ae49 107(defvar lisp-indent-defun-method '(4 &lambda &body))
bf92b5a4 108
59e0f579
GM
109
110(defun extended-loop-p (loop-start)
cb0fd101 111 "True if an extended loop form starts at LOOP-START."
59e0f579
GM
112 (condition-case ()
113 (save-excursion
114 (goto-char loop-start)
115 (forward-char 1)
116 (forward-sexp 2)
117 (backward-sexp 1)
118 (looking-at "\\sw"))
119 (error t)))
120
121
122(defun common-lisp-loop-part-indentation (indent-point state)
123 "Compute the indentation of loop form constituents."
124 (let* ((loop-indentation (save-excursion
125 (goto-char (elt state 1))
126 (current-column))))
127 (goto-char indent-point)
128 (beginning-of-line)
129 (cond ((not (extended-loop-p (elt state 1)))
93097873 130 (+ loop-indentation lisp-simple-loop-indentation))
59e0f579
GM
131 ((looking-at "^\\s-*\\(:?\\sw+\\|;\\)")
132 (+ loop-indentation lisp-loop-keyword-indentation))
133 (t
134 (+ loop-indentation lisp-loop-forms-indentation)))))
a1506d29 135
59e0f579 136
745bc783
JB
137;;;###autoload
138(defun common-lisp-indent-function (indent-point state)
59e0f579
GM
139 (if (save-excursion (goto-char (elt state 1))
140 (looking-at "([Ll][Oo][Oo][Pp]"))
141 (common-lisp-loop-part-indentation indent-point state)
142 (common-lisp-indent-function-1 indent-point state)))
a1506d29
JB
143
144
59e0f579 145(defun common-lisp-indent-function-1 (indent-point state)
745bc783
JB
146 (let ((normal-indent (current-column)))
147 ;; Walk up list levels until we see something
148 ;; which does special things with subforms.
149 (let ((depth 0)
150 ;; Path describes the position of point in terms of
eb8c3be9 151 ;; list-structure with respect to containing lists.
745bc783
JB
152 ;; `foo' has a path of (0 4 1) in `((a b c (d foo) f) g)'
153 (path ())
154 ;; set non-nil when somebody works out the indentation to use
155 calculated
f620e5e2
RS
156 ;; If non-nil, this is an indentation to use
157 ;; if nothing else specifies it more firmly.
158 tentative-calculated
159 (last-point indent-point)
745bc783
JB
160 ;; the position of the open-paren of the innermost containing list
161 (containing-form-start (elt state 1))
162 ;; the column of the above
163 sexp-column)
164 ;; Move to start of innermost containing list
165 (goto-char containing-form-start)
166 (setq sexp-column (current-column))
59e0f579 167
745bc783
JB
168 ;; Look over successively less-deep containing forms
169 (while (and (not calculated)
170 (< depth lisp-indent-maximum-backtracking))
171 (let ((containing-sexp (point)))
172 (forward-char 1)
173 (parse-partial-sexp (point) indent-point 1 t)
174 ;; Move to the car of the relevant containing form
f620e5e2 175 (let (tem function method tentative-defun)
745bc783
JB
176 (if (not (looking-at "\\sw\\|\\s_"))
177 ;; This form doesn't seem to start with a symbol
178 (setq function nil method nil)
179 (setq tem (point))
180 (forward-sexp 1)
bbf1ae49
RS
181 (setq function (downcase (buffer-substring-no-properties
182 tem (point))))
745bc783
JB
183 (goto-char tem)
184 (setq tem (intern-soft function)
185 method (get tem 'common-lisp-indent-function))
186 (cond ((and (null method)
187 (string-match ":[^:]+" function))
188 ;; The pleblisp package feature
189 (setq function (substring function
190 (1+ (match-beginning 0)))
191 method (get (intern-soft function)
192 'common-lisp-indent-function)))
193 ((and (null method))
194 ;; backwards compatibility
195 (setq method (get tem 'lisp-indent-function)))))
196 (let ((n 0))
197 ;; How far into the containing form is the current form?
198 (if (< (point) indent-point)
199 (while (condition-case ()
200 (progn
201 (forward-sexp 1)
202 (if (>= (point) indent-point)
203 nil
204 (parse-partial-sexp (point)
205 indent-point 1 t)
206 (setq n (1+ n))
207 t))
208 (error nil))))
209 (setq path (cons n path)))
210
211 ;; backwards compatibility.
212 (cond ((null function))
213 ((null method)
bbf1ae49 214 (when (null (cdr path))
f620e5e2
RS
215 ;; (package prefix was stripped off above)
216 (cond ((string-match "\\`def"
217 function)
218 (setq tentative-defun t))
410019e5
SS
219 ((string-match
220 (eval-when-compile
221 (concat "\\`\\("
222 (regexp-opt '("with" "without" "do"))
223 "\\)-"))
224 function)
f620e5e2 225 (setq method '(&lambda &body))))))
745bc783
JB
226 ;; backwards compatibility. Bletch.
227 ((eq method 'defun)
bbf1ae49 228 (setq method lisp-indent-defun-method)))
745bc783 229
59e0f579
GM
230 (cond ((and (or (eq (char-after (1- containing-sexp)) ?\')
231 (and (not lisp-backquote-indentation)
232 (eq (char-after (1- containing-sexp)) ?\`)))
893d4ef0 233 (not (eq (char-after (- containing-sexp 2)) ?\#)))
745bc783
JB
234 ;; No indentation for "'(...)" elements
235 (setq calculated (1+ sexp-column)))
5d80cc9c
SS
236 ((or (eq (char-after (1- containing-sexp)) ?\,)
237 (and (eq (char-after (1- containing-sexp)) ?\@)
238 (eq (char-after (- containing-sexp 2)) ?\,)))
239 ;; ",(...)" or ",@(...)"
240 (setq calculated normal-indent))
893d4ef0 241 ((eq (char-after (1- containing-sexp)) ?\#)
745bc783
JB
242 ;; "#(...)"
243 (setq calculated (1+ sexp-column)))
f620e5e2
RS
244 ((null method)
245 ;; If this looks like a call to a `def...' form,
246 ;; think about indenting it as one, but do it
247 ;; tentatively for cases like
248 ;; (flet ((defunp ()
249 ;; nil)))
250 ;; Set both normal-indent and tentative-calculated.
251 ;; The latter ensures this value gets used
252 ;; if there are no relevant containing constructs.
253 ;; The former ensures this value gets used
254 ;; if there is a relevant containing construct
255 ;; but we are nested within the structure levels
256 ;; that it specifies indentation for.
257 (if tentative-defun
258 (setq tentative-calculated
259 (common-lisp-indent-call-method
260 function lisp-indent-defun-method
261 path state indent-point
262 sexp-column normal-indent)
263 normal-indent tentative-calculated)))
745bc783
JB
264 ((integerp method)
265 ;; convenient top-level hack.
266 ;; (also compatible with lisp-indent-function)
267 ;; The number specifies how many `distinguished'
268 ;; forms there are before the body starts
269 ;; Equivalent to (4 4 ... &body)
270 (setq calculated (cond ((cdr path)
271 normal-indent)
272 ((<= (car path) method)
273 ;; `distinguished' form
274 (list (+ sexp-column 4)
275 containing-form-start))
276 ((= (car path) (1+ method))
277 ;; first body form.
278 (+ sexp-column lisp-body-indent))
279 (t
280 ;; other body form
281 normal-indent))))
f620e5e2
RS
282 (t
283 (setq calculated
284 (common-lisp-indent-call-method
285 function method path state indent-point
286 sexp-column normal-indent)))))
745bc783
JB
287 (goto-char containing-sexp)
288 (setq last-point containing-sexp)
bbf1ae49 289 (unless calculated
f620e5e2
RS
290 (condition-case ()
291 (progn (backward-up-list 1)
292 (setq depth (1+ depth)))
293 (error (setq depth lisp-indent-maximum-backtracking))))))
294 (or calculated tentative-calculated))))
295
296
297(defun common-lisp-indent-call-method (function method path state indent-point
298 sexp-column normal-indent)
299 (let ((lisp-indent-error-function function))
300 (if (symbolp method)
301 (funcall method
302 path state indent-point
303 sexp-column normal-indent)
304 (lisp-indent-259 method path state indent-point
305 sexp-column normal-indent))))
745bc783
JB
306
307(defun lisp-indent-report-bad-format (m)
308 (error "%s has a badly-formed %s property: %s"
309 ;; Love those free variable references!!
bf92b5a4 310 lisp-indent-error-function 'common-lisp-indent-function m))
745bc783
JB
311
312;; Blame the crufty control structure on dynamic scoping
313;; -- not on me!
314(defun lisp-indent-259 (method path state indent-point
315 sexp-column normal-indent)
316 (catch 'exit
317 (let ((p path)
318 (containing-form-start (elt state 1))
319 n tem tail)
320 ;; Isn't tail-recursion wonderful?
321 (while p
322 ;; This while loop is for destructuring.
323 ;; p is set to (cdr p) each iteration.
324 (if (not (consp method)) (lisp-indent-report-bad-format method))
325 (setq n (1- (car p))
326 p (cdr p)
327 tail nil)
328 (while n
329 ;; This while loop is for advancing along a method
330 ;; until the relevant (possibly &rest/&body) pattern
331 ;; is reached.
332 ;; n is set to (1- n) and method to (cdr method)
333 ;; each iteration.
334 (setq tem (car method))
335
336 (or (eq tem 'nil) ;default indentation
5d80cc9c 337 (eq tem '&lambda) ;lambda list
745bc783
JB
338 (and (eq tem '&body) (null (cdr method)))
339 (and (eq tem '&rest)
5d80cc9c
SS
340 (consp (cdr method))
341 (null (cddr method)))
745bc783
JB
342 (integerp tem) ;explicit indentation specified
343 (and (consp tem) ;destructuring
344 (eq (car tem) '&whole)
5d80cc9c
SS
345 (or (symbolp (cadr tem))
346 (integerp (cadr tem))))
745bc783
JB
347 (and (symbolp tem) ;a function to call to do the work.
348 (null (cdr method)))
349 (lisp-indent-report-bad-format method))
350
351 (cond ((and tail (not (consp tem)))
352 ;; indent tail of &rest in same way as first elt of rest
353 (throw 'exit normal-indent))
354 ((eq tem '&body)
355 ;; &body means (&rest <lisp-body-indent>)
356 (throw 'exit
357 (if (and (= n 0) ;first body form
358 (null p)) ;not in subforms
359 (+ sexp-column
360 lisp-body-indent)
361 normal-indent)))
362 ((eq tem '&rest)
363 ;; this pattern holds for all remaining forms
364 (setq tail (> n 0)
365 n 0
366 method (cdr method)))
367 ((> n 0)
368 ;; try next element of pattern
369 (setq n (1- n)
370 method (cdr method))
371 (if (< n 0)
372 ;; Too few elements in pattern.
373 (throw 'exit normal-indent)))
374 ((eq tem 'nil)
375 (throw 'exit (list normal-indent containing-form-start)))
bbf1ae49
RS
376 ((eq tem '&lambda)
377 (throw 'exit
378 (cond ((null p)
379 (list (+ sexp-column 4) containing-form-start))
380 ((null (cdr p))
381 (+ sexp-column 1))
382 (t normal-indent))))
745bc783
JB
383 ((integerp tem)
384 (throw 'exit
385 (if (null p) ;not in subforms
386 (list (+ sexp-column tem) containing-form-start)
387 normal-indent)))
388 ((symbolp tem) ;a function to call
389 (throw 'exit
390 (funcall tem path state indent-point
391 sexp-column normal-indent)))
392 (t
393 ;; must be a destructing frob
394 (if (not (null p))
395 ;; descend
bbf1ae49 396 (setq method (cddr tem)
745bc783 397 n nil)
bbf1ae49 398 (setq tem (cadr tem))
745bc783
JB
399 (throw 'exit
400 (cond (tail
401 normal-indent)
402 ((eq tem 'nil)
403 (list normal-indent
404 containing-form-start))
405 ((integerp tem)
406 (list (+ sexp-column tem)
407 containing-form-start))
408 (t
409 (funcall tem path state indent-point
410 sexp-column normal-indent))))))))))))
411\f
412(defun lisp-indent-tagbody (path state indent-point sexp-column normal-indent)
413 (if (not (null (cdr path)))
414 normal-indent
415 (save-excursion
416 (goto-char indent-point)
417 (beginning-of-line)
418 (skip-chars-forward " \t")
419 (list (cond ((looking-at "\\sw\\|\\s_")
420 ;; a tagbody tag
421 (+ sexp-column lisp-tag-indentation))
422 ((integerp lisp-tag-body-indentation)
423 (+ sexp-column lisp-tag-body-indentation))
424 ((eq lisp-tag-body-indentation 't)
425 (condition-case ()
426 (progn (backward-sexp 1) (current-column))
427 (error (1+ sexp-column))))
428 (t (+ sexp-column lisp-body-indent)))
429; (cond ((integerp lisp-tag-body-indentation)
430; (+ sexp-column lisp-tag-body-indentation))
431; ((eq lisp-tag-body-indentation 't)
432; normal-indent)
433; (t
434; (+ sexp-column lisp-body-indent)))
435 (elt state 1)
436 ))))
437
438(defun lisp-indent-do (path state indent-point sexp-column normal-indent)
439 (if (>= (car path) 3)
440 (let ((lisp-tag-body-indentation lisp-body-indent))
441 (funcall (function lisp-indent-tagbody)
5d80cc9c 442 path state indent-point sexp-column normal-indent))
745bc783 443 (funcall (function lisp-indent-259)
5d80cc9c
SS
444 '((&whole nil &rest
445 ;; the following causes weird indentation
446 ;;(&whole 1 1 2 nil)
447 )
448 (&whole nil &rest 1))
449 path state indent-point sexp-column normal-indent)))
745bc783 450
59e0f579 451
e7c8c428 452(defun lisp-indent-defmethod (path state indent-point sexp-column
ec69d5ec
GM
453 normal-indent)
454 "Indentation function defmethod."
59e0f579
GM
455 (lisp-indent-259 (if (and (>= (car path) 3)
456 (null (cdr path))
c2988498
RS
457 (save-excursion (goto-char (elt state 1))
458 (forward-char 1)
459 (forward-sexp 3)
460 (backward-sexp)
3166fce6 461 (looking-at ":\\|\\sw+")))
ec69d5ec
GM
462 '(4 4 (&whole 4 &rest 4) &body)
463 (get 'defun 'common-lisp-indent-function))
464 path state indent-point sexp-column normal-indent))
465
466
745bc783
JB
467(defun lisp-indent-function-lambda-hack (path state indent-point
468 sexp-column normal-indent)
469 ;; indent (function (lambda () <newline> <body-forms>)) kludgily.
470 (if (or (cdr path) ; wtf?
471 (> (car path) 3))
472 ;; line up under previous body form
473 normal-indent
474 ;; line up under function rather than under lambda in order to
475 ;; conserve horizontal space. (Which is what #' is for.)
476 (condition-case ()
477 (save-excursion
478 (backward-up-list 2)
479 (forward-char 1)
480 (if (looking-at "\\(lisp:+\\)?function\\(\\Sw\\|\\S_\\)")
481 (+ lisp-body-indent -1 (current-column))
482 (+ sexp-column lisp-body-indent)))
483 (error (+ sexp-column lisp-body-indent)))))
484
59e0f579 485
745bc783
JB
486\f
487(let ((l '((block 1)
5d80cc9c
SS
488 (case (4 &rest (&whole 2 &rest 1)))
489 (ccase . case) (ecase . case)
5d80cc9c
SS
490 (typecase . case) (etypecase . case) (ctypecase . case)
491 (catch 1)
492 (cond (&rest (&whole 2 &rest 1)))
493 (defvar (4 2 2))
5e9e032a 494 (defclass (6 4 (&whole 2 &rest 1) (&whole 2 &rest 1)))
5d80cc9c 495 (defconstant . defvar)
2ac6f2c8 496 (defcustom (4 2 2 2))
5d80cc9c 497 (defparameter . defvar)
5e9e032a
SS
498 (defconst . defcustom)
499 (define-condition . defclass)
b6f053c6 500 (define-modify-macro (4 &lambda &body))
5d80cc9c
SS
501 (defsetf (4 &lambda 4 &body))
502 (defun (4 &lambda &body))
503 (define-setf-method . defun)
504 (define-setf-expander . defun)
505 (defmacro . defun) (defsubst . defun) (deftype . defun)
ec69d5ec 506 (defmethod lisp-indent-defmethod)
5d80cc9c
SS
507 (defpackage (4 2))
508 (defstruct ((&whole 4 &rest (&whole 2 &rest 1))
509 &rest (&whole 2 &rest 1)))
510 (destructuring-bind
511 ((&whole 6 &rest 1) 4 &body))
512 (do lisp-indent-do)
513 (do* . do)
514 (dolist ((&whole 4 2 1) &body))
515 (dotimes . dolist)
516 (eval-when 1)
517 (flet ((&whole 4 &rest (&whole 1 &lambda &body)) &body))
518 (labels . flet)
519 (macrolet . flet)
e7c8c428 520 (generic-flet . flet) (generic-labels . flet)
bbf1ae49 521 (handler-case (4 &rest (&whole 2 &lambda &body)))
09a4d958 522 (restart-case . handler-case)
5d80cc9c
SS
523 ;; `else-body' style
524 (if (nil nil &body))
525 ;; single-else style (then and else equally indented)
526 (if (&rest nil))
527 (lambda (&lambda &rest lisp-indent-function-lambda-hack))
528 (let ((&whole 4 &rest (&whole 1 1 2)) &body))
529 (let* . let)
530 (compiler-let . let) ;barf
09a4d958 531 (handler-bind . let) (restart-bind . let)
5d80cc9c 532 (locally 1)
59e0f579 533 ;(loop lisp-indent-loop)
2180ea97 534 (:method (&lambda &body)) ; in `defgeneric'
5e9e032a
SS
535 (multiple-value-bind ((&whole 6 &rest 1) 4 &body))
536 (multiple-value-call (4 &body))
5d80cc9c
SS
537 (multiple-value-prog1 1)
538 (multiple-value-setq (4 2))
539 (multiple-value-setf . multiple-value-setq)
7dd21017 540 (pprint-logical-block (4 2))
5d80cc9c
SS
541 (print-unreadable-object ((&whole 4 1 &rest 1) &body))
542 ;; Combines the worst features of BLOCK, LET and TAGBODY
543 (prog (&lambda &rest lisp-indent-tagbody))
544 (prog* . prog)
545 (prog1 1)
546 (prog2 2)
547 (progn 0)
548 (progv (4 4 &body))
549 (return 0)
550 (return-from (nil &body))
10b97bf7 551 (symbol-macrolet . let)
5d80cc9c
SS
552 (tagbody lisp-indent-tagbody)
553 (throw 1)
554 (unless 1)
555 (unwind-protect (5 &body))
f0d527fc 556 (when 1)
e7c8c428
SS
557 (with-accessors . multiple-value-bind)
558 (with-condition-restarts . multiple-value-bind)
44c705d4 559 (with-output-to-string (4 2))
5e9e032a 560 (with-slots . multiple-value-bind)
f0d527fc 561 (with-standard-io-syntax (2)))))
e7c8c428
SS
562 (dolist (el l)
563 (put (car el) 'common-lisp-indent-function
564 (if (symbolp (cdr el))
565 (get (cdr el) 'common-lisp-indent-function)
566 (car (cdr el))))))
745bc783
JB
567
568\f
569;(defun foo (x)
570; (tagbody
571; foo
572; (bar)
573; baz
574; (when (losing)
575; (with-big-loser
576; (yow)
577; ((lambda ()
578; foo)
579; big)))
580; (flet ((foo (bar baz zap)
581; (zip))
582; (zot ()
583; quux))
584; (do ()
585; ((lose)
586; (foo 1))
587; (quux)
588; foo
589; (lose))
590; (cond ((x)
591; (win 1 2
592; (foo)))
593; (t
594; (lose
595; 3))))))
5d80cc9c 596
745bc783
JB
597
598;(put 'while 'common-lisp-indent-function 1)
599;(put 'defwrapper'common-lisp-indent-function ...)
600;(put 'def 'common-lisp-indent-function ...)
601;(put 'defflavor 'common-lisp-indent-function ...)
602;(put 'defsubst 'common-lisp-indent-function ...)
603
604;(put 'with-restart 'common-lisp-indent-function '((1 4 ((* 1))) (2 &body)))
605;(put 'restart-case 'common-lisp-indent-function '((1 4) (* 2 ((0 1) (* 1)))))
968880c4 606;(put 'define-condition 'common-lisp-indent-function '((1 6) (2 6 ((&whole 1))) (3 4 ((&whole 1))) (4 &body)))
745bc783
JB
607;(put 'with-condition-handler 'common-lisp-indent-function '((1 4 ((* 1))) (2 &body)))
608;(put 'condition-case 'common-lisp-indent-function '((1 4) (* 2 ((0 1) (1 3) (2 &body)))))
968880c4
DL
609;(put 'defclass 'common-lisp-indent-function '((&whole 2 &rest (&whole 2 &rest 1) &rest (&whole 2 &rest 1)))
610;(put 'defgeneric 'common-lisp-indent-function 'defun)
745bc783 611
ab5796a9 612;;; arch-tag: 7914d50f-92ec-4476-93fc-0f043a380e03
c0274f38 613;;; cl-indent.el ends here