Skip to content

Commit 41642f0

Browse files
tarsiusbrotzeit
authored andcommitted
rust-end-of-string: Move definition
1 parent 4a7a860 commit 41642f0

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

rust-mode.el

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -485,6 +485,13 @@ Does not match type annotations of the form \"foo::<\"."
485485
("use" . font-lock-constant-face)
486486
("fn" . font-lock-function-name-face)))))
487487

488+
(defun rust-end-of-string ()
489+
"Skip to the end of the current string."
490+
(save-excursion
491+
(skip-syntax-forward "^\"|")
492+
(skip-syntax-forward "\"|")
493+
(point)))
494+
488495
(defun rust-looking-back-str (str)
489496
"Return non-nil if there's a match on the text before point and STR.
490497
Like `looking-back' but for fixed strings rather than regexps (so
@@ -1601,13 +1608,6 @@ This is written mainly to be used as `end-of-defun-function' for Rust."
16011608
;; There is no opening brace, so consider the whole buffer to be one "defun"
16021609
(goto-char (point-max))))
16031610

1604-
(defun rust-end-of-string ()
1605-
"Skip to the end of the current string."
1606-
(save-excursion
1607-
(skip-syntax-forward "^\"|")
1608-
(skip-syntax-forward "\"|")
1609-
(point)))
1610-
16111611
;;; Formatting using rustfmt
16121612

16131613
(defconst rust-rustfmt-buffername "*rustfmt*")

0 commit comments

Comments
 (0)