diff options
| author | Gerd Moellmann | 2001-08-15 11:57:03 +0000 |
|---|---|---|
| committer | Gerd Moellmann | 2001-08-15 11:57:03 +0000 |
| commit | ec69d5ec2bb5f7428545d81422a89d87326592b2 (patch) | |
| tree | 1ee6920cfe79d842241f664c09cdd07aad34fa17 | |
| parent | 3e6f08e6f06e9058fc0f802ec58d8849c8b266ca (diff) | |
| download | emacs-ec69d5ec2bb5f7428545d81422a89d87326592b2.tar.gz emacs-ec69d5ec2bb5f7428545d81422a89d87326592b2.zip | |
(lisp-indent-defmethod): New function.
(toplevel): Set it as `common-lisp-indent-function' for
`defmethod'.
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-indent.el | 16 |
2 files changed, 17 insertions, 3 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 91879e33634..da8a24cdf71 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,5 +1,9 @@ | |||
| 1 | 2001-08-15 Gerd Moellmann <gerd@gnu.org> | 1 | 2001-08-15 Gerd Moellmann <gerd@gnu.org> |
| 2 | 2 | ||
| 3 | * emacs-lisp/cl-indent.el (lisp-indent-defmethod): New function. | ||
| 4 | (toplevel): Set it as `common-lisp-indent-function' for | ||
| 5 | `defmethod'. | ||
| 6 | |||
| 3 | * ediff-mult.el (ediff-get-meta-info): Fix the condition | 7 | * ediff-mult.el (ediff-get-meta-info): Fix the condition |
| 4 | of a while-loop. | 8 | of a while-loop. |
| 5 | 9 | ||
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index c03beb2a40c..69620763414 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el | |||
| @@ -355,6 +355,18 @@ by `lisp-body-indent'." | |||
| 355 | (&whole nil &rest 1)) | 355 | (&whole nil &rest 1)) |
| 356 | path state indent-point sexp-column normal-indent))) | 356 | path state indent-point sexp-column normal-indent))) |
| 357 | 357 | ||
| 358 | (defun lisp-indent-defmethod (path state indent-point sexp-column | ||
| 359 | normal-indent) | ||
| 360 | "Indentation function defmethod." | ||
| 361 | (lisp-indent-259 (if (save-excursion (goto-char (elt state 1)) | ||
| 362 | (forward-char 1) | ||
| 363 | (forward-sexp 2) | ||
| 364 | (looking-at "\\s-+:")) | ||
| 365 | '(4 4 (&whole 4 &rest 4) &body) | ||
| 366 | (get 'defun 'common-lisp-indent-function)) | ||
| 367 | path state indent-point sexp-column normal-indent)) | ||
| 368 | |||
| 369 | |||
| 358 | (defun lisp-indent-function-lambda-hack (path state indent-point | 370 | (defun lisp-indent-function-lambda-hack (path state indent-point |
| 359 | sexp-column normal-indent) | 371 | sexp-column normal-indent) |
| 360 | ;; indent (function (lambda () <newline> <body-forms>)) kludgily. | 372 | ;; indent (function (lambda () <newline> <body-forms>)) kludgily. |
| @@ -393,9 +405,7 @@ by `lisp-body-indent'." | |||
| 393 | (define-setf-method . defun) | 405 | (define-setf-method . defun) |
| 394 | (define-setf-expander . defun) | 406 | (define-setf-expander . defun) |
| 395 | (defmacro . defun) (defsubst . defun) (deftype . defun) | 407 | (defmacro . defun) (defsubst . defun) (deftype . defun) |
| 396 | ;; The following indents the first line of the body of a | 408 | (defmethod lisp-indent-defmethod) |
| 397 | ;; defmethod wrong. | ||
| 398 | ;(defmethod (4 4 (&whole 4 &rest 1) &body)) | ||
| 399 | (defpackage (4 2)) | 409 | (defpackage (4 2)) |
| 400 | (defstruct ((&whole 4 &rest (&whole 2 &rest 1)) | 410 | (defstruct ((&whole 4 &rest (&whole 2 &rest 1)) |
| 401 | &rest (&whole 2 &rest 1))) | 411 | &rest (&whole 2 &rest 1))) |