diff options
| author | Felix S Klock II <pnkfelix@pnkfx.org> | 2015-03-09 02:15:35 +0100 |
|---|---|---|
| committer | Felix S Klock II <pnkfelix@pnkfx.org> | 2015-03-09 02:15:35 +0100 |
| commit | cb5781d872fb921346d43f3b2cb29f2cccf262f0 (patch) | |
| tree | aab82822d10ee2a90358e3fdeb5800d3a6958487 /rust-mode.el | |
| parent | b15b0eb15da170610784fde7eaa288d39e63f723 (diff) | |
| parent | f2d709e55942c5c762efd315357b805ece57abfc (diff) | |
| download | rust-mode-cb5781d872fb921346d43f3b2cb29f2cccf262f0.tar.gz | |
Merge pull request #46 from MicahChalmer/fix-fill-region
Make fill-region work correctly in comments
Diffstat (limited to 'rust-mode.el')
| -rw-r--r-- | rust-mode.el | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/rust-mode.el b/rust-mode.el index 9a6eb5f..77fa349 100644 --- a/rust-mode.el +++ b/rust-mode.el @@ -508,7 +508,7 @@ (funcall body))) (defun rust-find-fill-prefix () - (rust-with-comment-fill-prefix (lambda () fill-prefix))) + (rust-in-comment-paragraph (lambda () (rust-with-comment-fill-prefix (lambda () fill-prefix))))) (defun rust-fill-paragraph (&rest args) "Special wrapping for `fill-paragraph' to handle multi-line comments with a * prefix on each line." @@ -704,6 +704,7 @@ This is written mainly to be used as `end-of-defun-function' for Rust." (setq-local fill-paragraph-function 'rust-fill-paragraph) (setq-local fill-forward-paragraph-function 'rust-fill-forward-paragraph) (setq-local adaptive-fill-function 'rust-find-fill-prefix) + (setq-local adaptive-fill-first-line-regexp "") (setq-local comment-multi-line t) (setq-local comment-line-break-function 'rust-comment-indent-new-line) (setq-local imenu-generic-expression rust-imenu-generic-expression) |
