[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/go-mode 8991b83 384/495: refactor/rename: emacs: kill go-r
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/go-mode 8991b83 384/495: refactor/rename: emacs: kill go-rename buffer correctly |
Date: |
Sat, 7 Aug 2021 09:05:53 -0400 (EDT) |
branch: elpa/go-mode
commit 8991b832d21ef98e7ff18145271136aa1ede08ff
Author: Dominik Honnef <dominik@honnef.co>
Commit: Dominik Honnef <dominik@honnef.co>
refactor/rename: emacs: kill go-rename buffer correctly
Match gofmt's behaviour of closing the status buffer. Don't display the
buffer in case of success as we were going to hide it instantly again,
anyway. Also, instead of using delete-window, use
gofmt--kill-error-buffer. gofmt--kill-error-buffer uses quit-window if
there's a window for the buffer, kill-buffer otherwise.
quit-window only deletes the window if it was created explicitly for the
status buffer and if it is still displaying it. This way, we won't close
windows that the user created or repurposed himself.
Additionally, this change ensures that we don't leave a *go-rename*
buffer lying around when gorename succeeded.
Fixes golang/go#10972.
Change-Id: Id1efb60d399f0062d870e925138aa827e12f3e58
Reviewed-on: https://go-review.googlesource.com/10453
Reviewed-by: Alan Donovan <adonovan@google.com>
---
rename_import/refactor/rename/rename.el | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/rename_import/refactor/rename/rename.el
b/rename_import/refactor/rename/rename.el
index ea6c744..d1741d5 100644
--- a/rename_import/refactor/rename/rename.el
+++ b/rename_import/refactor/rename/rename.el
@@ -65,12 +65,12 @@ the `gorename' tool. With FORCE, call `gorename' with the
;; On success, print the one-line result in the message bar,
;; and hide the *go-rename* buffer.
- (let ((w (display-buffer (current-buffer))))
- (if success
- (progn
- (message "%s" (go--buffer-string-no-trailing-space))
- (delete-window w))
- ;; failure
+ (if success
+ (progn
+ (message "%s" (go--buffer-string-no-trailing-space))
+ (gofmt--kill-error-buffer (current-buffer)))
+ ;; failure
+ (let ((w (display-buffer (current-buffer))))
(message "gorename exited")
(shrink-window-if-larger-than-buffer w)
(set-window-point w (point-min)))))))
- [nongnu] elpa/go-mode f8b4bf9 300/495: Add to beginning of compilation-error-regexp-alist, (continued)
- [nongnu] elpa/go-mode f8b4bf9 300/495: Add to beginning of compilation-error-regexp-alist, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode cfaa193 348/495: cmd/guru: rename oracle to guru, copying it to a single package, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 4d1ab9f 347/495: cmd/oracle: improve error messages, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9c2bf9b 360/495: cmd/guru: emacs: push mark in go-guru-definition, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 5ef1d53 355/495: cmd/guru: use byte (not rune) count in -modified archive, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 60ed26e 368/495: cmd/guru: emacs: only check modified buffers with file names, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d209550 353/495: cmd/guru: emacs: minor changes to keybindings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6ac5669 372/495: cmd/guru: emacs: interpret byte offsets correctly, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode afb2a24 382/495: go.tools: use golang.org/x/... import paths, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 3a82342 379/495: Regenerate AUTHORS, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 8991b83 384/495: refactor/rename: emacs: kill go-rename buffer correctly,
ELPA Syncer <=
- [nongnu] elpa/go-mode adea2e5 395/495: Make go-guru-build-tags a list of strings, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode d511e35 402/495: Replace obsolete one-argument form of ‘looking-back’., ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 35f6826 404/495: Bump version to 1.5.0, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode da55ef1 413/495: Evaluate error conditions before prompting for new name, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 59dfa96 423/495: Add confirmation prompt for Playground uploads, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 13e9f22 428/495: Fix go-rename when buffer is not visiting any file, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 9ab06b3 443/495: indent: fix nested dangling lines that don't use parens, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 6d58e9d 442/495: indent: fix case statement in func in composite literal, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 592bd4b 440/495: indent: fix various cases with dangling operators, ELPA Syncer, 2021/08/07
- [nongnu] elpa/go-mode 35a5ddc 445/495: indent: fix decl statements with dangling "=", ELPA Syncer, 2021/08/07