Re: small indentation inside with-html from spinneret (Common Lisp)
Michael Heerdegen via Users list for the GNU Emacs text editor <[email protected]> Mon, 08 Jun 2026 02:37:08 +0200
| Newsgroups | gmane.emacs.help |
|---|---|
| Message-ID | <[email protected]> |
Peter Münster <[email protected]> writes: > > How does your setup look like? How can I reproduce your issue? > > I start emacs like this: > > emacs -Q -l init-test.el test.lisp > > This is file init-test.el: > [...] Thank you. > This is my test case: > > (with-clog-create body > (gui-menu-bar () > (gui-menu-drop-down (...) > (gui-menu-item (...) > (gui-menu-drop-down (...) > (gui-menu-item (...)) > (gui-menu-item (...))))))) > > So it works for 3 levels. Why not for more? This is easy to answer: 3 is the default binding of the option `lisp-indent-maximum-backtracking'. Dunno if larger values are bad for performance. Probably not too much. I don't know much about the cl indenting habits, but if you wanted such a behavior as default when the programmed lisp indent doesn't lead to a special result, something like this might work well: #+begin_src emacs-lisp (advice-add 'common-lisp-indent-function :after-until (defun my-common-lisp-indent-function--offset-fallback (indent-point state) (save-excursion (goto-char (elt state 1)) (+ (current-column) 2)))) #+end_src This would change the algorithm to always do what you want for `with-clog-create'. HTH, Michael.