File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1876,6 +1876,21 @@ pub fn foo<T,
1876
1876
hello();
1877
1877
}" ))
1878
1878
1879
+ (ert-deftest indent-open-paren-in-column0 ()
1880
+ ; ; Just pass the same text for the "deindented" argument. This
1881
+ ; ; avoids the extra spaces normally inserted, which would mess up
1882
+ ; ; the test because string contents aren't touched by reindentation.
1883
+ (let ((text "
1884
+ const a: &'static str = r#\"
1885
+ {}\" #;
1886
+ fn main() {
1887
+ let b = \" //\" ;
1888
+ let c = \"\" ;
1889
+
1890
+ }
1891
+ " ))
1892
+ (test-indent text text)))
1893
+
1879
1894
(defun rust-test-matching-parens (content pairs &optional nonparen-positions )
1880
1895
" Assert that in rust-mode, given a buffer with the given `content' ,
1881
1896
emacs's paren matching will find all of the pairs of positions
Original file line number Diff line number Diff line change @@ -1456,6 +1456,7 @@ This is written mainly to be used as `end-of-defun-function' for Rust."
1456
1456
(setq-local comment-start " // " )
1457
1457
(setq-local comment-end " " )
1458
1458
(setq-local indent-tabs-mode nil )
1459
+ (setq-local open-paren-in-column-0-is-defun-start nil )
1459
1460
1460
1461
; ; Auto indent on }
1461
1462
(setq-local
You can’t perform that action at this time.
0 commit comments