about summary refs log tree commit diff stats
path: root/.emacs.d
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d')
-rw-r--r--.emacs.d/lisp/init-ui.el2
-rw-r--r--.emacs.d/lisp/init-windows.el14
2 files changed, 14 insertions, 2 deletions
diff --git a/.emacs.d/lisp/init-ui.el b/.emacs.d/lisp/init-ui.el
index 0c12934..cb1c831 100644
--- a/.emacs.d/lisp/init-ui.el
+++ b/.emacs.d/lisp/init-ui.el
@@ -16,7 +16,7 @@
                          (global-display-line-numbers-mode)
                          (global-hl-line-mode +1)
 
-                         (global-set-key (kbd "C-x C-S-k") 'kill-this-buffer)
+                         (global-set-key (kbd "C-x C-S-k") 'kill-buffer)
 
                          (add-to-list 'custom-theme-load-path "~/.emacs.d/themes")
                          (load-theme 'non-modo t)))
diff --git a/.emacs.d/lisp/init-windows.el b/.emacs.d/lisp/init-windows.el
index be6d902..fcf39cc 100644
--- a/.emacs.d/lisp/init-windows.el
+++ b/.emacs.d/lisp/init-windows.el
@@ -205,9 +205,21 @@ This is based on the frame width, with the threshold being customised using
     "Abort buffer flipping and return to the original buffer."
     (interactive)
     (iflipb-restore-buffers))
+  (defun iflipb-kill-current-buffer ()
+    "Same as `kill-current-buffer' but keep the iflipb buffer list state.
+
+Modified from `iflipb-kill-buffer'."
+    (interactive)
+    (call-interactively #'kill-current-buffer)
+    (if (iflipb-first-iflipb-buffer-switch-command)
+        (setq last-command 'kill-current-buffer)
+      (if (< iflipb-current-buffer-index (length (iflipb-interesting-buffers)))
+          (iflipb-select-buffer iflipb-current-buffer-index)
+        (iflipb-select-buffer (1- iflipb-current-buffer-index)))
+      (setq last-command 'iflipb-kill-current-buffer)))
   :custom (iflipb-buffer-list-function 'iflipb-persp-buffer-list)
   :bind
-  ("C-x k" . iflipb-kill-buffer) ;; TODO replace with a kill currently selected buffer command
+  ("C-x k" . iflipb-kill-current-buffer)
   ("<f12>" . iflipb-previous-buffer)
   ("<f11>" . iflipb-next-buffer)
   ("<f10>" . iflibp-abort))