Fork me on GitHub
#emacs
<
2018-10-18
>
richiardiandrea02:10:40

Uhm funny I think I noticed that too but not consistently...thought I was crazy 😸 it smells like a clojure-mode issue

dpsutton03:10:47

i 100% agree with that annoyance

dpsutton03:10:42

i enabled clojure-mode in the emacs scratch buffer and reproduced it. so yes, clojure-mode

dpsutton03:10:29

(defun clojure-indent-line ()
      "Indent current line as Clojure code."
      (if (clojure-in-docstring-p)
          (save-excursion
            (beginning-of-line)
            (when (and (looking-at "^\\s-*")
                       (<= (string-width (match-string-no-properties 0))
                           (string-width (clojure-docstring-fill-prefix))))
              (replace-match (clojure-docstring-fill-prefix))))
        (lisp-indent-line)))

dpsutton03:10:35

is the offending function

dpsutton03:10:17

and it appears that your intuition that it was confused and thinks it is in a docstring

dpsutton03:10:19

Simple fix for me is to add another call to clojure-docstring-p in the when after the call to beginning of line. Because it should be when still in a docstring indent the line. I think

richiardiandrea16:10:35

Has this been open as issue at least? I don't see it in the project...I can do that

dpsutton16:10:31

Not that I know of. I think @U0E2EQFME was going to go this

dpsutton16:10:23

not sure if that's still the plan

dadair17:10:15

Still in the plan just haven’t got to it yet, planning on getting to it later this week

dadair05:10:39

Thanks for digging into it! I’ll see if I can get a PR up to fix

bozhidar13:10:19

A PR would be most welcome!

bozhidar14:10:14

(I’ve noticed this issue a while ago, but I never got to it)