aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-05-24 16:58:32 +0000
committerRichard M. Stallman1998-05-24 16:58:32 +0000
commitbf92b5a4d6bb8743d515ea557d3306a5b7eaf6cc (patch)
tree93473b617973c56d08e9a9a307d5077d46dbb5ab
parent20a6d217c3da9e09f4866ca0fca80117d1d91c6c (diff)
downloademacs-bf92b5a4d6bb8743d515ea557d3306a5b7eaf6cc.tar.gz
emacs-bf92b5a4d6bb8743d515ea557d3306a5b7eaf6cc.zip
(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.
-rw-r--r--lisp/emacs-lisp/cl-indent.el18
1 files changed, 11 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el
index 54f13239b18..4bcc7111f0d 100644
--- a/lisp/emacs-lisp/cl-indent.el
+++ b/lisp/emacs-lisp/cl-indent.el
@@ -79,6 +79,8 @@ by `lisp-body-indent'."
79 :group 'lisp-indent) 79 :group 'lisp-indent)
80 80
81 81
82(defvar lisp-indent-error-function)
83
82;;;###autoload 84;;;###autoload
83(defun common-lisp-indent-function (indent-point state) 85(defun common-lisp-indent-function (indent-point state)
84 (let ((normal-indent (current-column))) 86 (let ((normal-indent (current-column)))
@@ -188,13 +190,15 @@ by `lisp-body-indent'."
188 ;; other body form 190 ;; other body form
189 normal-indent)))) 191 normal-indent))))
190 ((symbolp method) 192 ((symbolp method)
191 (setq calculated (funcall method 193 (let ((lisp-indent-error-function function))
192 path state indent-point 194 (setq calculated (funcall method
193 sexp-column normal-indent))) 195 path state indent-point
196 sexp-column normal-indent))))
194 (t 197 (t
195 (setq calculated (lisp-indent-259 198 (let ((lisp-indent-error-function function))
196 method path state indent-point 199 (setq calculated (lisp-indent-259
197 sexp-column normal-indent))))) 200 method path state indent-point
201 sexp-column normal-indent))))))
198 (goto-char containing-sexp) 202 (goto-char containing-sexp)
199 (setq last-point containing-sexp) 203 (setq last-point containing-sexp)
200 (if (not calculated) 204 (if (not calculated)
@@ -208,7 +212,7 @@ by `lisp-body-indent'."
208(defun lisp-indent-report-bad-format (m) 212(defun lisp-indent-report-bad-format (m)
209 (error "%s has a badly-formed %s property: %s" 213 (error "%s has a badly-formed %s property: %s"
210 ;; Love those free variable references!! 214 ;; Love those free variable references!!
211 function 'common-lisp-indent-function m)) 215 lisp-indent-error-function 'common-lisp-indent-function m))
212 216
213;; Blame the crufty control structure on dynamic scoping 217;; Blame the crufty control structure on dynamic scoping
214;; -- not on me! 218;; -- not on me!