radian icon indicating copy to clipboard operation
radian copied to clipboard

Electric indentation in docstrings does not work

Open raxod502 opened this issue 9 years ago • 1 comments

Currently, we have an ugly hack in init.el to make sure electric indentation works in Clojure docstrings. (This doesn't fix #1; that's a separate issue.)

;;; Make sure electric indentation *always* works. For some reason, if
;;; this is omitted, electric indentation works most of the time, but it
;;; fails inside Clojure docstrings. (TAB will add the requisite two
;;; spaces, but you shouldn't have to do this manually after pressing RET.)
;;; I'd like to find a more elegant solution to this problem.
(define-key clojure-mode-map (kbd "RET") 'newline-and-indent)

It would be nice to fix this problem without rebinding RET.

raxod502 avatar Jul 26 '16 13:07 raxod502

Interestingly, electric indentation also doesn't work in Python docstrings without hardcoding RET to use newline-and-indent instead of newline.

raxod502 avatar Oct 29 '16 21:10 raxod502

Closing as stale: I no longer use Clojure, and nobody else has complained about this bug.

raxod502 avatar Feb 21 '23 17:02 raxod502