summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>2001-11-19 06:24:05 +0000
committerRichard M. Stallman <rms@gnu.org>2001-11-19 06:24:05 +0000
commitc2988498965503ba210043abca8928d96e6aabd8 (patch)
treec9e93a63fd07a03a21e65d1cf206766bbdd70139 /lisp/emacs-lisp
parentb4d7a2ece93cc15d518c1b423592de5259d5eba1 (diff)
downloademacs-c2988498965503ba210043abca8928d96e6aabd8.tar.gz
emacs-c2988498965503ba210043abca8928d96e6aabd8.tar.bz2
emacs-c2988498965503ba210043abca8928d96e6aabd8.zip
(lisp-indent-defmethod): At first three elements, act like defun.
Advance to start of 3rd sexp by moving fwd and backing over it.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r--lisp/emacs-lisp/cl-indent.el11
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index fee555d3ed3..5b22be7206d 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -358,10 +358,13 @@ by `lisp-body-indent'."
(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))