comparison lisp/emacs-lisp/lisp-mode.el @ 91041:bdb3fe0ba9fa

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 866-879) - Merge multi-tty branch - Update from CVS - Merge from emacs--rel--22 Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-257
author Miles Bader <miles@gnu.org>
date Thu, 11 Oct 2007 16:22:07 +0000
parents aaccdab0ee26 5039706521c9
children 606f2d163a64
comparison
equal deleted inserted replaced
91040:14c4a6aac623 91041:bdb3fe0ba9fa
259 1000 259 1000
260 len))) 260 len)))
261 261
262 (defvar lisp-mode-shared-map 262 (defvar lisp-mode-shared-map
263 (let ((map (make-sparse-keymap))) 263 (let ((map (make-sparse-keymap)))
264 (define-key map "\t" 'lisp-indent-line)
265 (define-key map "\e\C-q" 'indent-sexp) 264 (define-key map "\e\C-q" 'indent-sexp)
266 (define-key map "\177" 'backward-delete-char-untabify) 265 (define-key map "\177" 'backward-delete-char-untabify)
267 ;; This gets in the way when viewing a Lisp file in view-mode. As 266 ;; This gets in the way when viewing a Lisp file in view-mode. As
268 ;; long as [backspace] is mapped into DEL via the 267 ;; long as [backspace] is mapped into DEL via the
269 ;; function-key-map, this should remain disabled!! 268 ;; function-key-map, this should remain disabled!!
783 (unless (and (boundp 'comment-auto-fill-only-comments) 782 (unless (and (boundp 'comment-auto-fill-only-comments)
784 comment-auto-fill-only-comments) 783 comment-auto-fill-only-comments)
785 (let ((comment-start nil) (comment-start-skip nil)) 784 (let ((comment-start nil) (comment-start-skip nil))
786 (do-auto-fill)))))) 785 (do-auto-fill))))))
787 786
788 (defvar lisp-indent-offset nil 787 (defcustom lisp-indent-offset nil
789 "If non-nil, indent second line of expressions that many more columns.") 788 "If non-nil, indent second line of expressions that many more columns."
789 :group 'lisp
790 :type '(choice nil integer))
791 (put 'lisp-body-indent 'safe-local-variable
792 (lambda (x) (or (null x) (integerp x))))
793
790 (defvar lisp-indent-function 'lisp-indent-function) 794 (defvar lisp-indent-function 'lisp-indent-function)
791 795
792 (defun lisp-indent-line (&optional whole-exp) 796 (defun lisp-indent-line (&optional whole-exp)
793 "Indent current line as Lisp code. 797 "Indent current line as Lisp code.
794 With argument, indent any additional lines of the same expression 798 With argument, indent any additional lines of the same expression
1024 (lisp-indent-specform method state 1028 (lisp-indent-specform method state
1025 indent-point normal-indent)) 1029 indent-point normal-indent))
1026 (method 1030 (method
1027 (funcall method indent-point state))))))) 1031 (funcall method indent-point state)))))))
1028 1032
1029 (defvar lisp-body-indent 2 1033 (defcustom lisp-body-indent 2
1030 "Number of columns to indent the second line of a `(def...)' form.") 1034 "Number of columns to indent the second line of a `(def...)' form."
1035 :group 'lisp
1036 :type 'integer)
1037 (put 'lisp-body-indent 'safe-local-variable 'integerp)
1031 1038
1032 (defun lisp-indent-specform (count state indent-point normal-indent) 1039 (defun lisp-indent-specform (count state indent-point normal-indent)
1033 (let ((containing-form-start (elt state 1)) 1040 (let ((containing-form-start (elt state 1))
1034 (i count) 1041 (i count)
1035 body-indent containing-form-column) 1042 body-indent containing-form-column)