Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use replace-buffer-contents to reformat buffer
According to `replace-buffer-contents` documentation this function replaces buffer contents in smarter way. Especially interesting part: As far as possible the replacement is non-destructive, i.e. existing buffer contents, markers, properties, and overlays in the current buffer stay intact. One example where some properties are preserved is when origami-mode is used on the buffer to collapse some regions. After this change collapsed regions stay collapsed after reformatting
- Loading branch information