comparison lisp/emacs-lisp/lisp-mode.el @ 103512:ce2fc4a55d15

(lisp-indent-offset): Fix safe-local-variable property. (lisp-indent-function): Make it a defcustom.
author Glenn Morris <rgm@gnu.org>
date Mon, 22 Jun 2009 06:24:32 +0000
parents 247269056555
children 1b791c5d1cee
comparison
equal deleted inserted replaced
103511:995efe4ff123 103512:ce2fc4a55d15
875 875
876 (defcustom lisp-indent-offset nil 876 (defcustom lisp-indent-offset nil
877 "If non-nil, indent second line of expressions that many more columns." 877 "If non-nil, indent second line of expressions that many more columns."
878 :group 'lisp 878 :group 'lisp
879 :type '(choice (const nil) integer)) 879 :type '(choice (const nil) integer))
880 (put 'lisp-body-indent 'safe-local-variable 880 (put 'lisp-indent-offset 'safe-local-variable
881 (lambda (x) (or (null x) (integerp x)))) 881 (lambda (x) (or (null x) (integerp x))))
882 882
883 (defvar lisp-indent-function 'lisp-indent-function 883 (defcustom lisp-indent-function 'lisp-indent-function
884 "A function to be called by `calculate-lisp-indent'. 884 "A function to be called by `calculate-lisp-indent'.
885 It indents the arguments of a Lisp function call. This function 885 It indents the arguments of a Lisp function call. This function
886 should accept two arguments: the indent-point, and the 886 should accept two arguments: the indent-point, and the
887 `parse-partial-sexp' state at that position. One option for this 887 `parse-partial-sexp' state at that position. One option for this
888 function is `common-lisp-indent-function'.") 888 function is `common-lisp-indent-function'."
889 :type 'function
890 :group 'lisp)
889 891
890 (defun lisp-indent-line (&optional whole-exp) 892 (defun lisp-indent-line (&optional whole-exp)
891 "Indent current line as Lisp code. 893 "Indent current line as Lisp code.
892 With argument, indent any additional lines of the same expression 894 With argument, indent any additional lines of the same expression
893 rigidly along with this one." 895 rigidly along with this one."