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."
201201(defun rust-paren-level () (nth 0 (syntax-ppss )))
202202(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss )))
203203(defun rust-rewind-past-str-cmnt () (goto-char (nth 8 (syntax-ppss ))))
204+
204205(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+
212218(defun rust-in-macro ()
213219 (save-excursion
214220 (when (> (rust-paren-level) 0 )
You can’t perform that action at this time.
0 commit comments