Mercurial > emacs
comparison lisp/emacs-lisp/lisp-mode.el @ 78730:7191ad0f348d
(lisp-indent-offset): Make defcustom. Add `safe-local-variable' property.
(lisp-body-indent): Likewise.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Sun, 02 Sep 2007 19:18:07 +0000 |
parents | 06f0300fda43 |
children | 78ee6fae0e41 5039706521c9 |
comparison
equal
deleted
inserted
replaced
78729:1c6c7a9e1ef9 | 78730:7191ad0f348d |
---|---|
781 (unless (and (boundp 'comment-auto-fill-only-comments) | 781 (unless (and (boundp 'comment-auto-fill-only-comments) |
782 comment-auto-fill-only-comments) | 782 comment-auto-fill-only-comments) |
783 (let ((comment-start nil) (comment-start-skip nil)) | 783 (let ((comment-start nil) (comment-start-skip nil)) |
784 (do-auto-fill)))))) | 784 (do-auto-fill)))))) |
785 | 785 |
786 (defvar lisp-indent-offset nil | 786 (defcustom lisp-indent-offset nil |
787 "If non-nil, indent second line of expressions that many more columns.") | 787 "If non-nil, indent second line of expressions that many more columns." |
788 :group 'lisp | |
789 :type '(choice nil integer)) | |
790 (put 'lisp-body-indent 'safe-local-variable | |
791 (lambda (x) (or (null x) (integerp x)))) | |
792 | |
788 (defvar lisp-indent-function 'lisp-indent-function) | 793 (defvar lisp-indent-function 'lisp-indent-function) |
789 | 794 |
790 (defun lisp-indent-line (&optional whole-exp) | 795 (defun lisp-indent-line (&optional whole-exp) |
791 "Indent current line as Lisp code. | 796 "Indent current line as Lisp code. |
792 With argument, indent any additional lines of the same expression | 797 With argument, indent any additional lines of the same expression |
1022 (lisp-indent-specform method state | 1027 (lisp-indent-specform method state |
1023 indent-point normal-indent)) | 1028 indent-point normal-indent)) |
1024 (method | 1029 (method |
1025 (funcall method indent-point state))))))) | 1030 (funcall method indent-point state))))))) |
1026 | 1031 |
1027 (defvar lisp-body-indent 2 | 1032 (defcustom lisp-body-indent 2 |
1028 "Number of columns to indent the second line of a `(def...)' form.") | 1033 "Number of columns to indent the second line of a `(def...)' form." |
1034 :group 'lisp | |
1035 :type 'integer) | |
1036 (put 'lisp-body-indent 'safe-local-variable 'integerp) | |
1029 | 1037 |
1030 (defun lisp-indent-specform (count state indent-point normal-indent) | 1038 (defun lisp-indent-specform (count state indent-point normal-indent) |
1031 (let ((containing-form-start (elt state 1)) | 1039 (let ((containing-form-start (elt state 1)) |
1032 (i count) | 1040 (i count) |
1033 body-indent containing-form-column) | 1041 body-indent containing-form-column) |