aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1998-02-22 00:30:03 +0000
committerKarl Heuer1998-02-22 00:30:03 +0000
commita63f38642a4eb8df4d3cfae0c4cf02c6859a13f8 (patch)
tree7f1c1471be3f9ca148bac0b012628ca148bb14a2
parent883212ce6905a2bde30bf2dd5eb647a09fd597c4 (diff)
downloademacs-a63f38642a4eb8df4d3cfae0c4cf02c6859a13f8.tar.gz
emacs-a63f38642a4eb8df4d3cfae0c4cf02c6859a13f8.zip
Fix indentation rules for
multiple-value-setf and multiple-value-list.
-rw-r--r--lisp/emacs-lisp/cl-indent.el126
1 files changed, 61 insertions, 65 deletions
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index 9e179432de4..c072cac0c7e 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -370,74 +370,70 @@ by `lisp-body-indent'."
370 370
371(let ((l '((block 1) 371(let ((l '((block 1)
372 (catch 1) 372 (catch 1)
373 (case (4 &rest (&whole 2 &rest 1))) 373 (case (4 &rest (&whole 2 &rest 1)))
374 (ccase . case) (ecase . case) 374 (ccase . case) (ecase . case)
375 (typecase . case) (etypecase . case) (ctypecase . case) 375 (typecase . case) (etypecase . case) (ctypecase . case)
376 (catch 1) 376 (catch 1)
377 (cond (&rest (&whole 2 &rest 1))) 377 (cond (&rest (&whole 2 &rest 1)))
378 (block 1) 378 (block 1)
379 (defvar (4 2 2)) 379 (defvar (4 2 2))
380 (defconstant . defvar) (defparameter . defvar) 380 (defconstant . defvar) (defparameter . defvar)
381 (define-modify-macro 381 (define-modify-macro
382 (4 &body))
383 (define-setf-method
384 (4 (&whole 4 &rest 1) &body))
385 (defsetf (4 (&whole 4 &rest 1) 4 &body))
386 (defun (4 (&whole 4 &rest 1) &body))
387 (defmacro . defun) (deftype . defun)
388 (defstruct ((&whole 4 &rest (&whole 2 &rest 1))
389 &rest (&whole 2 &rest 1)))
390 (destructuring-bind
391 ((&whole 6 &rest 1) 4 &body))
392 (do lisp-indent-do)
393 (do* . do)
394 (dolist ((&whole 4 2 1) &body))
395 (dotimes . dolist)
396 (eval-when 1)
397 (flet ((&whole 4 &rest (&whole 1 (&whole 4 &rest 1) &body))
398 &body))
399 (labels . flet)
400 (macrolet . flet)
401 ;; `else-body' style
402 (if (nil nil &body))
403 ;; single-else style (then and else equally indented)
404 (if (&rest nil))
405 ;(lambda ((&whole 4 &rest 1) &body))
406 (lambda ((&whole 4 &rest 1)
407 &rest lisp-indent-function-lambda-hack))
408 (let ((&whole 4 &rest (&whole 1 1 2)) &body))
409 (let* . let)
410 (compiler-let . let) ;barf
411 (locally 1)
412 ;(loop ...)
413 (multiple-value-bind
414 ((&whole 6 &rest 1) 4 &body))
415 (multiple-value-call
416 (4 &body)) 382 (4 &body))
417 (multiple-value-list 1) 383 (define-setf-method
418 (multiple-value-prog1 1) 384 (4 (&whole 4 &rest 1) &body))
419 (multiple-value-setq 385 (defsetf (4 (&whole 4 &rest 1) 4 &body))
420 (4 2)) 386 (defun (4 (&whole 4 &rest 1) &body))
421 ;; Combines the worst features of BLOCK, LET and TAGBODY 387 (defmacro . defun) (deftype . defun)
422 (prog ((&whole 4 &rest 1) &rest lisp-indent-tagbody)) 388 (defstruct ((&whole 4 &rest (&whole 2 &rest 1))
423 (prog* . prog) 389 &rest (&whole 2 &rest 1)))
424 (prog1 1) 390 (destructuring-bind
425 (prog2 2) 391 ((&whole 6 &rest 1) 4 &body))
426 (progn 0) 392 (do lisp-indent-do)
427 (progv (4 4 &body)) 393 (do* . do)
428 (return 0) 394 (dolist ((&whole 4 2 1) &body))
429 (return-from (nil &body)) 395 (dotimes . dolist)
430 (tagbody lisp-indent-tagbody) 396 (eval-when 1)
431 (throw 1) 397 (flet ((&whole 4 &rest (&whole 1 (&whole 4 &rest 1) &body))
432 (unless 1) 398 &body))
433 (unwind-protect 399 (labels . flet)
434 (5 &body)) 400 (macrolet . flet)
435 (when 1)))) 401 ;; `else-body' style
402 (if (nil nil &body))
403 ;; single-else style (then and else equally indented)
404 (if (&rest nil))
405 ;(lambda ((&whole 4 &rest 1) &body))
406 (lambda ((&whole 4 &rest 1)
407 &rest lisp-indent-function-lambda-hack))
408 (let ((&whole 4 &rest (&whole 1 1 2)) &body))
409 (let* . let)
410 (compiler-let . let) ;barf
411 (locally 1)
412 ;(loop ...)
413 (multiple-value-bind ((&whole 6 &rest 1) 4 &body))
414 (multiple-value-call (4 &body))
415 (multiple-value-prog1 1)
416 (multiple-value-setq (4 2))
417 (multiple-value-setf . multiple-value-setq)
418 ;; Combines the worst features of BLOCK, LET and TAGBODY
419 (prog ((&whole 4 &rest 1) &rest lisp-indent-tagbody))
420 (prog* . prog)
421 (prog1 1)
422 (prog2 2)
423 (progn 0)
424 (progv (4 4 &body))
425 (return 0)
426 (return-from (nil &body))
427 (tagbody lisp-indent-tagbody)
428 (throw 1)
429 (unless 1)
430 (unwind-protect (5 &body))
431 (when 1))))
436 (while l 432 (while l
437 (put (car (car l)) 'common-lisp-indent-function 433 (put (car (car l)) 'common-lisp-indent-function
438 (if (symbolp (cdr (car l))) 434 (if (symbolp (cdr (car l)))
439 (get (cdr (car l)) 'common-lisp-indent-function) 435 (get (cdr (car l)) 'common-lisp-indent-function)
440 (car (cdr (car l))))) 436 (car (cdr (car l)))))
441 (setq l (cdr l)))) 437 (setq l (cdr l))))
442 438
443 439