[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idris-mode d1a9171fd7 1/8: Jump to last Idris Code buffer
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idris-mode d1a9171fd7 1/8: Jump to last Idris Code buffer when we quit buffer |
Date: |
Fri, 11 Nov 2022 06:58:58 -0500 (EST) |
branch: elpa/idris-mode
commit d1a9171fd76eae6b1da7494d15fefdbb157e346c
Author: Marek L <nospam.keram@gmail.com>
Commit: Marek Labos <marek@syftapp.com>
Jump to last Idris Code buffer when we quit buffer
With current version, when Idris buffer is displayed in window
that already contains other buffer then
on pressing "q" to quit Idris buffer the focus
stays in the window of the Idris buffer.
This change ensures that the focus returns to the buffer
and window from where we have most likely
came to the killed Idris buffer.
---
idris-common-utils.el | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/idris-common-utils.el b/idris-common-utils.el
index 5e981d6243..857bd36615 100644
--- a/idris-common-utils.el
+++ b/idris-common-utils.el
@@ -72,12 +72,15 @@ Lisp package.")
(get-buffer buffer))
((bufferp buffer)
buffer)
- (t (message "don't know how to kill buffer")))))
+ (t (message "don't know how to kill buffer"))))
+ (return-buffer (seq-find (lambda (b) (eq 'idris-mode
(buffer-local-value 'major-mode b)))
+ (buffer-list))))
(when (and buf (buffer-live-p buf))
(let ((win (get-buffer-window buf)))
(kill-buffer buf)
(when (null (window-prev-buffers win))
- (delete-window win))))))
+ (delete-window win))))
+ (when return-buffer (pop-to-buffer return-buffer
`(display-buffer-reuse-window)))))
(defun idris-minibuffer-respecting-message (text &rest args)
"Display TEXT as a message, without hiding any minibuffer contents."
- [nongnu] elpa/idris-mode updated (8933ab84f9 -> 1adee4fe06), ELPA Syncer, 2022/11/11
- [nongnu] elpa/idris-mode d1a9171fd7 1/8: Jump to last Idris Code buffer when we quit buffer,
ELPA Syncer <=
- [nongnu] elpa/idris-mode cba57f7ff4 6/8: Merge pull request #557 from keram/jump-back-on-quit, ELPA Syncer, 2022/11/11
- [nongnu] elpa/idris-mode e7e2a6c3bc 3/8: Remove dependency on if-let* defined in subr-x, ELPA Syncer, 2022/11/11
- [nongnu] elpa/idris-mode 1adee4fe06 8/8: Merge pull request #560 from keram/interactive-s-flag, ELPA Syncer, 2022/11/11
- [nongnu] elpa/idris-mode 103f1e5fbf 2/8: Add ability to quickly switch from Idris repl to, ELPA Syncer, 2022/11/11
- [nongnu] elpa/idris-mode e1fd68e494 4/8: Revert removal of s flag from interactive., ELPA Syncer, 2022/11/11
- [nongnu] elpa/idris-mode bc44e934f8 5/8: Stop CI run?, ELPA Syncer, 2022/11/11
- [nongnu] elpa/idris-mode 7a0b5c736d 7/8: Merge pull request #558 from keram/jump-to-file-from-repl, ELPA Syncer, 2022/11/11