When I write a backquotedlist that starts with ,(
emacs aligns the remaining items to the parenthesis and not to the comma; e.g.:
(defun kb-test1 ()
`(,(hello)
fdefef
,(fefesd)))
(defparameter *kb-test2*
`(,@(hello)
,@(gkere)
,@(lkdsf)))
I would expected it to be aligned as:
(defparameter *kb-test2*
`(,@(hello)
,@(gkere)
,@(lkdsf)))
When the first term does not start with ,@(
or ,(
; e.g.:
(defparameter *kb-test2*
`((hello)
,@(gkere)
,@(lkdsf)))
The indentation is as I expect.
I experimented with enabling and disable various modes, I removed my .emacs
and .emacs.d
and customized my emacs step by step. Using the following steps I could reproduce the indent behaviour:
- Remove
.emacs
and.emacs.d
- Plain emacs v.26.1
Indents as expected - Add https://melpa.org/packages to
package-archives
Indents as expected - Install the package
slime
(versionslime-20181106.1113
) - Quit emacs
- Start emacs
- Visit a fresh file
~/tmp/test.lisp
This shows lisp-mode and slime-mode are active (e.g. my status line isU:--- test.lisp All L1 (Lisp Slime)
) - type:
(defun f()
enter`(,@(hello)
enter (In reality I did not type a space after the backquote). - Now point is at (3,6) (as shown by
column-number-mode
) aligned with the second parenthesis instead of at (3,4) aligned with,
.
Is this how lisp code ought to be aligned? Is this a bug in Lisp-mode or one of the other minor modes? Or is it a matter of personal taste?
Is this caused by slime-mode or does it have some other cause?
How can I correct it? Should I send a bug report?
emacs -Q
and then opening your example file. If the problem persists in that case, something in your personal configuration is causing the problem (maybe one or the minor modes you're using).emacs -Q
the indendation is as I expect. So it must be in personal settings or in some minor mode. I will search for the config that causes it and edit my question.