summaryrefslogtreecommitdiffstats
path: root/ravi-init-ido.el
diff options
context:
space:
mode:
Diffstat (limited to 'ravi-init-ido.el')
-rw-r--r--ravi-init-ido.el12
1 files changed, 11 insertions, 1 deletions
diff --git a/ravi-init-ido.el b/ravi-init-ido.el
index 8173353..307a35a 100644
--- a/ravi-init-ido.el
+++ b/ravi-init-ido.el
@@ -27,7 +27,17 @@
;; Almost all of the code below is stolen from jwiegley's .emacs.d.
(use-package ibuffer
- :bind ("C-x C-b" . ibuffer))
+ :bind ("C-x C-b" . ibuffer)
+ :config
+ (progn
+ ;; Switching to ibuffer puts the cursor on the most recent past buffer
+ (defadvice ibuffer (around ibuffer-point-to-most-recent-but-one activate) ()
+ "Open ibuffer with cursor pointed to most recent buffer name"
+ (let ((recent-buffer-name (buffer-name (other-buffer (current-buffer) t))))
+ ad-do-it
+ (ibuffer-jump-to-buffer recent-buffer-name)))
+ )
+ )
;;;_ , ido