(lisp-indent-error-function): New variable.
(common-lisp-indent-function): Bind lisp-indent-error-function. (lisp-indent-report-bad-format): Use lisp-indent-error-function.
This commit is contained in:
parent
20a6d217c3
commit
bf92b5a4d6
1 changed files with 11 additions and 7 deletions
|
@ -79,6 +79,8 @@ by `lisp-body-indent'."
|
||||||
:group 'lisp-indent)
|
:group 'lisp-indent)
|
||||||
|
|
||||||
|
|
||||||
|
(defvar lisp-indent-error-function)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun common-lisp-indent-function (indent-point state)
|
(defun common-lisp-indent-function (indent-point state)
|
||||||
(let ((normal-indent (current-column)))
|
(let ((normal-indent (current-column)))
|
||||||
|
@ -188,13 +190,15 @@ by `lisp-body-indent'."
|
||||||
;; other body form
|
;; other body form
|
||||||
normal-indent))))
|
normal-indent))))
|
||||||
((symbolp method)
|
((symbolp method)
|
||||||
(setq calculated (funcall method
|
(let ((lisp-indent-error-function function))
|
||||||
path state indent-point
|
(setq calculated (funcall method
|
||||||
sexp-column normal-indent)))
|
path state indent-point
|
||||||
|
sexp-column normal-indent))))
|
||||||
(t
|
(t
|
||||||
(setq calculated (lisp-indent-259
|
(let ((lisp-indent-error-function function))
|
||||||
method path state indent-point
|
(setq calculated (lisp-indent-259
|
||||||
sexp-column normal-indent)))))
|
method path state indent-point
|
||||||
|
sexp-column normal-indent))))))
|
||||||
(goto-char containing-sexp)
|
(goto-char containing-sexp)
|
||||||
(setq last-point containing-sexp)
|
(setq last-point containing-sexp)
|
||||||
(if (not calculated)
|
(if (not calculated)
|
||||||
|
@ -208,7 +212,7 @@ by `lisp-body-indent'."
|
||||||
(defun lisp-indent-report-bad-format (m)
|
(defun lisp-indent-report-bad-format (m)
|
||||||
(error "%s has a badly-formed %s property: %s"
|
(error "%s has a badly-formed %s property: %s"
|
||||||
;; Love those free variable references!!
|
;; Love those free variable references!!
|
||||||
function 'common-lisp-indent-function m))
|
lisp-indent-error-function 'common-lisp-indent-function m))
|
||||||
|
|
||||||
;; Blame the crufty control structure on dynamic scoping
|
;; Blame the crufty control structure on dynamic scoping
|
||||||
;; -- not on me!
|
;; -- not on me!
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue