I would like to have a function that gives me spaces according to a number i multiplied by a factor f. So I end up with returning 6 spaces with (spaces 3 2).

This is to be able to indent some debugging comments in my elisp code when there are splits in the code (e.g. conditionals).

1 Answer 1


C-u 8 SPC will insert 8 spaces.

Equivalently from lisp:

(self-insert-command 8 ?\s)
  • An elisp function is what I need.
    – Dilna
    Aug 1, 2023 at 1:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.