[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/reformatter 664fa96fd0 24/81: Add/update comments
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/reformatter 664fa96fd0 24/81: Add/update comments |
Date: |
Tue, 5 Sep 2023 04:03:34 -0400 (EDT) |
branch: elpa/reformatter
commit 664fa96fd068f7b20e49c5ec16299888fced31db
Author: Steve Purcell <steve@sanityinc.com>
Commit: Steve Purcell <steve@sanityinc.com>
Add/update comments
---
reformatter.el | 23 +++++++++++++----------
1 file changed, 13 insertions(+), 10 deletions(-)
diff --git a/reformatter.el b/reformatter.el
index 34baedefdb..b1c2dcc0f1 100644
--- a/reformatter.el
+++ b/reformatter.el
@@ -164,6 +164,10 @@ DISPLAY-ERRORS, shows a buffer if the formatting fails."
(interactive "rp")
(let* ((err-file (make-temp-file ,(symbol-name name)))
(out-file (make-temp-file ,(symbol-name name)))
+ ;; Setting this coding sysmte might not universally be
+ ;; the best default, but was apparently necessary for
+ ;; some hand-rolled reformatter functions that this
+ ;; library was written to replace.
(coding-system-for-read 'utf-8)
(coding-system-for-write 'utf-8))
(unwind-protect
@@ -179,16 +183,15 @@ DISPLAY-ERRORS, shows a buffer if the formatting fails."
(ansi-color-apply-on-region (point-min) (point-max)))
(special-mode))
(if (eq retcode 0)
- (progn
- (save-restriction
- ;; This replacement method minimises
- ;; disruption to marker positions and the
- ;; undo list
- (narrow-to-region beg end)
- (insert-file-contents out-file nil nil nil t)
- ;; In future this might be made optional, or a
user-provided
- ;; ":after" form could be inserted for execution
- (whitespace-cleanup)))
+ (save-restriction
+ ;; This replacement method minimises
+ ;; disruption to marker positions and the
+ ;; undo list
+ (narrow-to-region beg end)
+ (insert-file-contents out-file nil nil nil t)
+ ;; In future this might be made optional, or a
user-provided
+ ;; ":after" form could be inserted for execution
+ (whitespace-cleanup))
(if display-errors
(display-buffer error-buffer)
(message ,(concat (symbol-name name) " failed: see %s")
(buffer-name error-buffer)))))
- [nongnu] elpa/reformatter 2ff029f84b 64/81: Display error message in error buffer if call-process signals, (continued)
- [nongnu] elpa/reformatter 2ff029f84b 64/81: Display error message in error buffer if call-process signals, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 7c5452bf31 69/81: Update tests to used suffixed commands only, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 130205bbe2 68/81: Remove the catch-all alias: users should make their own defalias as needed, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter e6c23cd52d 58/81: Update CI config to specify nix-path, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 113ddd51bd 74/81: Add dependabot config, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 1cbf7225b0 76/81: Merge pull request #40 from purcell/dependabot/github_actions/cachix/install-nix-action-22, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 1af1371f71 78/81: chore(deps): bump actions/checkout from 2 to 4, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 7cf8b5d71e 08/81: Note about absence of "gensym", ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 48bcae5856 06/81: Doc fixes, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 0aea1debd1 05/81: package-lint fixes, primarily renaming define-formatter, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 664fa96fd0 24/81: Add/update comments,
ELPA Syncer <=
- [nongnu] elpa/reformatter d0d58c4eef 01/81: Initial commit, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 9c6c239371 04/81: Generate a separate custom variable for the mode lighter, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 9478d6ca2d 19/81: Fix -on-save-mode docstring, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 466740b40a 17/81: Link to example of using reformatter in a user config, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter c684c0b30f 10/81: Add links to usages in the wild, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 2c85cd76e5 03/81: Always output :keymap and :lighter minor mode arguments, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 6484d45a87 07/81: Only support string mode lighters, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 123d192fb0 16/81: Use https for sanityinc.com link, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 2b2785557a 15/81: Clearer documentation, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter b2963f5100 23/81: Narrow to region when replacing contents with reformatter output, ELPA Syncer, 2023/09/05