summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/cl-indent.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2012-03-25 16:37:21 -0400
committerStefan Monnier <monnier@iro.umontreal.ca>2012-03-25 16:37:21 -0400
commit699c782b7668c44d0fa4446331b0590a6d5dac82 (patch)
tree5dcce364741d0761920a3d274b0fc8aba4103d45 /lisp/emacs-lisp/cl-indent.el
parent98fb480ee31bf74cf554044f60f21df16566dd7f (diff)
parente99a9b8bdccadded1f6fae88ee7a2a93dfd4eacf (diff)
downloademacs-699c782b7668c44d0fa4446331b0590a6d5dac82.tar.gz
emacs-699c782b7668c44d0fa4446331b0590a6d5dac82.tar.bz2
emacs-699c782b7668c44d0fa4446331b0590a6d5dac82.zip
Merge from trunk
Diffstat (limited to 'lisp/emacs-lisp/cl-indent.el')
-rw-r--r--lisp/emacs-lisp/cl-indent.el26
1 files changed, 17 insertions, 9 deletions
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index 40434636e62..01bdfbf4bf2 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -1,6 +1,6 @@
;;; cl-indent.el --- enhanced lisp-indent mode
-;; Copyright (C) 1987, 2000-2011 Free Software Foundation, Inc.
+;; Copyright (C) 1987, 2000-2012 Free Software Foundation, Inc.
;; Author: Richard Mlynarik <mly@eddie.mit.edu>
;; Created: July 1987
@@ -104,6 +104,7 @@ If non-nil, alignment is done with the first keyword
\(defun foo (arg1 arg2 &rest rest
&key key1 key2)
#|...|#)"
+ :version "24.1"
:type 'boolean
:group 'lisp-indent)
@@ -111,6 +112,7 @@ If non-nil, alignment is done with the first keyword
"Indentation of lambda list keyword parameters.
See `lisp-lambda-list-keyword-parameter-alignment'
for more information."
+ :version "24.1"
:type 'integer
:group 'lisp-indent)
@@ -130,6 +132,7 @@ If non-nil, alignment is done with the first parameter
\(defun foo (arg1 arg2 &key key1 key2
key3 key4)
#|...|#)"
+ :version "24.1"
:type 'boolean
:group 'lisp-indent)
@@ -159,14 +162,19 @@ is set to `defun'.")
(current-column))))
(goto-char indent-point)
(beginning-of-line)
- (cond ((not (extended-loop-p (elt state 1)))
- (+ loop-indentation lisp-simple-loop-indentation))
- ((looking-at "^\\s-*\\(:?\\sw+\\|;\\)")
- (+ loop-indentation lisp-loop-keyword-indentation))
- (t
- (+ loop-indentation lisp-loop-forms-indentation)))))
-
-
+ (list
+ (cond ((not (extended-loop-p (elt state 1)))
+ (+ loop-indentation lisp-simple-loop-indentation))
+ ((looking-at "^\\s-*\\(:?\\sw+\\|;\\)")
+ (+ loop-indentation lisp-loop-keyword-indentation))
+ (t
+ (+ loop-indentation lisp-loop-forms-indentation)))
+ ;; Tell the caller that the next line needs recomputation, even
+ ;; though it doesn't start a sexp.
+ loop-indentation)))
+
+
+;; Cf (info "(elisp)Specification List")
;;;###autoload
(defun common-lisp-indent-function (indent-point state)
"Function to indent the arguments of a Lisp function call.