diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2017-02-28 11:47:45 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2017-02-28 11:47:45 +0900 |
commit | 0e355e781616936759cff8e6a46adb01760d4211 (patch) | |
tree | 1848b82ab43af084a72ba427846eb4b919fdbb86 /lisp/ibuffer.el | |
parent | 499b43d4cc4aa8fd1131246aa544ab81e894e8da (diff) | |
download | emacs-0e355e781616936759cff8e6a46adb01760d4211.tar.gz |
Show Ibuffer and jump to line listing current buffer
* lisp/ibuffer.el (ibuffer-jump): New command (Bug#25577).
; * etc/NEWS: Add entry for it.
Diffstat (limited to 'lisp/ibuffer.el')
-rw-r--r-- | lisp/ibuffer.el | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lisp/ibuffer.el b/lisp/ibuffer.el index eb821b257b3..66916b2bca1 100644 --- a/lisp/ibuffer.el +++ b/lisp/ibuffer.el @@ -2491,6 +2491,15 @@ FORMATS is the value to use for `ibuffer-formats'. (unless ibuffer-expert (message "Commands: m, u, t, RET, g, k, S, D, Q; q to quit; h for help")))))) +;;;###autoload +(defun ibuffer-jump (&optional other-window) + "Call Ibuffer and set point at the line listing the current buffer. +If optional arg OTHER-WINDOW is non-nil, then use another window." + (interactive "P") + (let ((name (buffer-name))) + (ibuffer other-window) + (ignore-errors (ibuffer-jump-to-buffer name)))) + (put 'ibuffer-mode 'mode-class 'special) (define-derived-mode ibuffer-mode special-mode "IBuffer" "A major mode for viewing a list of buffers. |