radian
radian copied to clipboard
Electric indentation in docstrings does not work
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.
Interestingly, electric indentation also doesn't work in Python docstrings without hardcoding RET to use newline-and-indent instead of newline.
Closing as stale: I no longer use Clojure, and nobody else has complained about this bug.