Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identation of ":else" in nested conditionals in the loop macro looks wrong. #746

Open
borderite opened this issue Jan 7, 2023 · 0 comments

Comments

@borderite
Copy link

My understanding is that when conditionals are nested in the loop macro expression, :else corresponds to the last conditional (:if or :when). If this is the case, the indentation level of :else should be the same as that of the last conditional. For example. I expect sometin like:

(let ((str "a2c4d3e5"))
  (print
   (loop :for x across str
	 :when (digit-char-p x)
	     :if (= (rem (digit-char-p x) 3) 0)
	        :collect x
	     :else
	        :collect #\z)))

But what I actualy get under SLIME 2.27 is:

(let ((str "a2c4d3e5"))
  (print
   (loop :for x across str
	 :when (digit-char-p x)
	     :if (= (rem (digit-char-p x) 3) 0)
	        :collect x
	 :else
	     :collect #\z)))

That is, :end is aligned with the outer conditional. It would be wonderful if you could fix this behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant