changeset 41256:4a78098c3bd7

(lisp-indent-defmethod): At first three elements, act like defun. Advance to start of 3rd sexp by moving fwd and backing over it.
author Richard M. Stallman <rms@gnu.org>
date Mon, 19 Nov 2001 06:24:05 +0000
parents 719d61cbaf9f
children 0605a90581d4
files lisp/emacs-lisp/cl-indent.el
diffstat 1 files changed, 7 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/emacs-lisp/cl-indent.el	Mon Nov 19 06:21:29 2001 +0000
+++ b/lisp/emacs-lisp/cl-indent.el	Mon Nov 19 06:24:05 2001 +0000
@@ -358,10 +358,13 @@
 (defun lisp-indent-defmethod (path state indent-point sexp-column
 				   normal-indent)
   "Indentation function defmethod."
-  (lisp-indent-259 (if (save-excursion (goto-char (elt state 1))
-				       (forward-char 1)
-				       (forward-sexp 2)
-				       (looking-at "\\s-+:"))
+  (lisp-indent-259 (if (and (>= (first path) 3)
+                            (null (rest path))
+			    (save-excursion (goto-char (elt state 1))
+					    (forward-char 1)
+                                            (forward-sexp 3)
+                                            (backward-sexp)
+					    (looking-at ":")))
 		       '(4 4 (&whole 4 &rest 4) &body)
 		     (get 'defun 'common-lisp-indent-function))
 		   path state indent-point sexp-column normal-indent))