[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/reformatter f5fbed9e7d 46/81: Close error window when ther
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/reformatter f5fbed9e7d 46/81: Close error window when there is no errors to be shown |
Date: |
Tue, 5 Sep 2023 04:03:36 -0400 (EDT) |
branch: elpa/reformatter
commit f5fbed9e7d381e9b910421df9cd869d7e500df76
Author: Erick Navarro <erick@navarro.io>
Commit: Erick Navarro <erick@navarro.io>
Close error window when there is no errors to be shown
After fixing the code and if there is no more errors to be shown,
error window kept open and it has to be closed manually
---
reformatter.el | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/reformatter.el b/reformatter.el
index acf2aa9fb2..1262fcd695 100644
--- a/reformatter.el
+++ b/reformatter.el
@@ -183,12 +183,15 @@ DISPLAY-ERRORS, shows a buffer if the formatting fails."
(ansi-color-apply-on-region (point-min) (point-max)))
(special-mode))
(if (zerop retcode)
- (save-restriction
- ;; This replacement method minimises
- ;; disruption to marker positions and the
- ;; undo list
- (narrow-to-region beg end)
- (reformatter-replace-buffer-contents-from-file
out-file))
+ (progn
+ (save-restriction
+ ;; This replacement method minimises
+ ;; disruption to marker positions and the
+ ;; undo list
+ (narrow-to-region beg end)
+ (reformatter-replace-buffer-contents-from-file
out-file))
+ ;; if there is no errors the error-buffer shouldn't
be kept open
+ (delete-windows-on error-buffer))
(if display-errors
(display-buffer error-buffer)
(message ,(concat (symbol-name name) " failed: see %s")
(buffer-name error-buffer)))))
- [nongnu] elpa/reformatter 7b336cab51 20/81: Link to sqlformat as another example of real-world usage, (continued)
- [nongnu] elpa/reformatter 7b336cab51 20/81: Link to sqlformat as another example of real-world usage, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter c2466f745a 21/81: Mention "needed by" reverse dependencies list on MELPA page, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 947411170d 18/81: Generate both -buffer and -region commands by default, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 8eec55689a 13/81: Doc clarification, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 8372cc4259 39/81: Prefer "elisp" for code blocks, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 466203594c 36/81: Fix broken link to example, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 8423ad9e83 47/81: Merge pull request #21 from erickgnavar/close-error-buffer-with-no-errors, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter c6919a6549 38/81: Merge pull request #17 from bradyt/patch-1, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 9d277200c1 52/81: Add Emacs 27.1 to CI matrix, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 0c24778dfc 50/81: Fix grammar, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter f5fbed9e7d 46/81: Close error window when there is no errors to be shown,
ELPA Syncer <=
- [nongnu] elpa/reformatter e8f70b20ca 45/81: No longer forcibly call delete-trailing-whitespace, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 3833c13dd9 51/81: Clarify how args are evaluated, and what to avoid, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 028dae00dd 30/81: Merge pull request #4 from peterwvj/patch-1, ELPA Syncer, 2023/09/05
- [nongnu] elpa/reformatter 7e41f1a397 33/81: Use replace-buffer-contents when available and not broken, ELPA Syncer, 2023/09/05
- [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