summaryrefslogtreecommitdiff
path: root/rust-rustfmt.el
diff options
context:
space:
mode:
authorbrotzeit <brotzeitmacher@gmail.com>2022-01-08 09:08:47 +0100
committerbrotzeit <brotzeitmacher@gmail.com>2022-01-08 09:08:47 +0100
commit541786c9bb0887e2357b4d6210b25ca4ceea3ab3 (patch)
treefb326a133ee79d57e6aba84625cde4633043b93b /rust-rustfmt.el
parentad674a1d43a7ffefd3dba33599c6aa5f49d70e43 (diff)
downloadrust-mode-541786c9bb0887e2357b4d6210b25ca4ceea3ab3.tar.gz
remove save-window-excursion
Diffstat (limited to 'rust-rustfmt.el')
-rw-r--r--rust-rustfmt.el7
1 files changed, 3 insertions, 4 deletions
diff --git a/rust-rustfmt.el b/rust-rustfmt.el
index 530abaa..d28c4ad 100644
--- a/rust-rustfmt.el
+++ b/rust-rustfmt.el
@@ -332,10 +332,9 @@ Return the created process."
;; preserve location and markers in buffer, otherwise we can try to
;; save locations as best we can, though we still lose markers.
(save-excursion
- (save-window-excursion
- (if (version<= "26.2" emacs-version)
- (rust--format-buffer-using-replace-buffer-contents)
- (rust--format-buffer-saving-position-manually)))))
+ (if (version<= "26.2" emacs-version)
+ (rust--format-buffer-using-replace-buffer-contents)
+ (rust--format-buffer-saving-position-manually))))
(defun rust-enable-format-on-save ()
"Enable formatting using rustfmt when saving buffer."