diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2018-02-21 14:30:12 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2018-02-21 14:30:12 -0500 |
| commit | cc2435b9e5899c0787929a62dc6e6dcdb982febc (patch) | |
| tree | 1ec2203756594a440a3acd58606d413a6a94d8fb /rust-mode.el | |
| parent | 0d408d5fe5bae38f6463e78486eab4263d4ae40d (diff) | |
| parent | b861aa9e54e2af362d702ae4bf8741ea4617dc3c (diff) | |
| download | rust-mode-cc2435b9e5899c0787929a62dc6e6dcdb982febc.tar.gz | |
Merge pull request #264 from jjwest/master
Fixed indent when ? operator is used in chained method calls
Diffstat (limited to 'rust-mode.el')
| -rw-r--r-- | rust-mode.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rust-mode.el b/rust-mode.el index 0c31b6c..908b892 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -320,7 +320,7 @@ buffer." (- (current-column) rust-indent-offset))))) (cond ;; foo.bar(...) - ((rust-looking-back-str ")") + ((looking-back "[)?]" (1- (point))) (backward-list 1) (funcall skip-dot-identifier)) @@ -501,7 +501,7 @@ buffer." ;; ..or if the previous line ends with any of these: ;; { ? : ( , ; [ } ;; then we are at the beginning of an expression, so stay on the baseline... - (looking-back "[(,:;?[{}]\\|[^|]|" (- (point) 2)) + (looking-back "[(,:;[{}]\\|[^|]|" (- (point) 2)) ;; or if the previous line is the end of an attribute, stay at the baseline... (progn (rust-rewind-to-beginning-of-current-level-expr) (looking-at "#"))))) baseline |
