summaryrefslogtreecommitdiff
path: root/rust-mode.el
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2021-03-29 19:07:00 +0200
committerbrotzeit <brotzeitmacher@gmail.com>2021-04-23 13:57:07 +0200
commit41642f0573d51120b4ca46113c63977a55d68b27 (patch)
tree17d13a8f43fc6b3b18b79946e4ff6f4418ee8c8b /rust-mode.el
parent4a7a860e46b1955e335188c1a22ee8b1fdf670b6 (diff)
downloadrust-mode-41642f0573d51120b4ca46113c63977a55d68b27.tar.gz
rust-end-of-string: Move definition
Diffstat (limited to 'rust-mode.el')
-rw-r--r--rust-mode.el14
1 files changed, 7 insertions, 7 deletions
diff --git a/rust-mode.el b/rust-mode.el
index 498481f..f35a947 100644
--- a/rust-mode.el
+++ b/rust-mode.el
@@ -485,6 +485,13 @@ Does not match type annotations of the form \"foo::<\"."
("use" . font-lock-constant-face)
("fn" . font-lock-function-name-face)))))
+(defun rust-end-of-string ()
+ "Skip to the end of the current string."
+ (save-excursion
+ (skip-syntax-forward "^\"|")
+ (skip-syntax-forward "\"|")
+ (point)))
+
(defun rust-looking-back-str (str)
"Return non-nil if there's a match on the text before point and STR.
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."
;; There is no opening brace, so consider the whole buffer to be one "defun"
(goto-char (point-max))))
-(defun rust-end-of-string ()
- "Skip to the end of the current string."
- (save-excursion
- (skip-syntax-forward "^\"|")
- (skip-syntax-forward "\"|")
- (point)))
-
;;; Formatting using rustfmt
(defconst rust-rustfmt-buffername "*rustfmt*")