We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d74801c commit 28f8323Copy full SHA for 28f8323
elisp/shm-indent.el
@@ -147,11 +147,21 @@ hai = do foo bar
147
((or (= (line-beginning-position)
148
(line-end-position))
149
(not (shm-current-node)))
150
- (if (= (line-beginning-position)
151
- (line-end-position))
152
- (newline)
+ (cond
+ ((= (line-beginning-position)
+ (line-end-position))
153
+ (newline))
154
+ ((save-excursion
155
+ (move-beginning-of-line nil)
156
+ (looking-at "--"))
157
(progn (newline)
- (shm/simple-indent))))
158
+ (shm/simple-indent)
159
+ (save-excursion
160
161
+ (insert "--")
162
+ (delete-char 2))))
163
+ (t (progn (newline)
164
+ (shm/simple-indent)))))
165
((and (shm-in-string)
166
(not (= (shm-node-start (shm-current-node))
167
(point))))
0 commit comments