I'm trying to define a new major mode using
define-generic-mode and want to try reusing
c-indent-line-or-region for my
indent-line-function. I've inserted
(set (make-local-variable 'indent-line-function) 'c-indent-line-or-region)
in the initialisation part of
define-generic-mode and it is correctly set. However, when I hit enter in a buffer using that mode I get an error:
c-indent-line-or-region: Variable binding depth exceeds max-specpdl-size
I've searched around and found suggestions to enable
debug-on-error, which I have done, but the
*Backtrace* buffer is always empty and accompanied by a message
Lisp nesting exceeds max-lisp-eval-depth'
How should I go about debugging this?