Fork me on GitHub

Anyone know how to make single ; comments align the same way as double ;; comments? I'm pretty sure this is built-in lisp mode behaviour, and tho I don't hate it, my co-workers who don't use emacs use single ; for regular, not end of line comments


@j0ni That’s not possible. This behaviour is not configurable. In classic Lisp style ; is an inline comment and ;; is a line comment, therefore the different behaviour.


This can be changed, of course, but it’d be pretty painful as we’ll have to override some of the lisp-mode code. Cursive recently added support to use ;; for line comments, which should alleviate problems like yours.


I (unfortunately) found myself in the same situation as you, @j0ni. You can set setq comment-indent-function to something like the following: Battle-tested for a few weeks, finally works fine after some traumatic first iterations. I'd recommend just settling on ;; like good Clojure citizens 🙂


(btw that code links to a SO question I made 5 years ago... my thinking has definitely changed since then ;p)