File tree Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Expand file tree Collapse file tree 1 file changed +13
-7
lines changed Original file line number Diff line number Diff line change @@ -201,14 +201,20 @@ function or trait. When nil, where will be aligned with fn or trait."
201
201
(defun rust-paren-level () (nth 0 (syntax-ppss )))
202
202
(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss )))
203
203
(defun rust-rewind-past-str-cmnt () (goto-char (nth 8 (syntax-ppss ))))
204
+
204
205
(defun rust-rewind-irrelevant ()
205
- (let ((starting (point )))
206
- (skip-chars-backward " [:space:]\n " )
207
- (if (rust-looking-back-str " */" ) (backward-char ))
208
- (if (rust-in-str-or-cmnt)
209
- (rust-rewind-past-str-cmnt))
210
- (if (/= starting (point ))
211
- (rust-rewind-irrelevant))))
206
+ (let ((continue t ))
207
+ (while continue
208
+ (let ((starting (point )))
209
+ (skip-chars-backward " [:space:]\n " )
210
+ (when (rust-looking-back-str " */" )
211
+ (backward-char ))
212
+ (when (rust-in-str-or-cmnt)
213
+ (rust-rewind-past-str-cmnt))
214
+ ; ; Rewind until the point no longer moves
215
+ (setq continue (/= starting (point )))))))
216
+
217
+
212
218
(defun rust-in-macro ()
213
219
(save-excursion
214
220
(when (> (rust-paren-level) 0 )
You can’t perform that action at this time.
0 commit comments