Ibuffer: 'w' and 'B' default to buffer at current line
commita7e9d1cce3f935dbe9f242f0bf2dbf34f5919952
authorTino Calancha <tino.calancha@gmail.com>
Mon, 3 Oct 2016 12:16:00 +0000 (3 21:16 +0900)
committerTino Calancha <tino.calancha@gmail.com>
Mon, 3 Oct 2016 12:16:00 +0000 (3 21:16 +0900)
tree93bb7cf3489fab90f3e03852d03a311a707c0796
parent3b6eb9489d03e5ecc60e487e8eb340e34942825c
Ibuffer: 'w' and 'B' default to buffer at current line

See discussion in:
https://lists.gnu.org/archive/html/emacs-devel/2016-09/msg00384.html
* lisp/ibuffer.el (ibuffer--near-buffers): New defun;
return buffers near current line.
* lisp/ibuf-ext.el (ibuffer-copy-buffername-as-kill): Use it.
Add argument ARG; if a non-zero integer, return next ARG buffers.
Otherwise return the marked buffers.
If there are not marked buffers, return buffer at current line
without prompting the user.
Use ibuffer-get-marked-buffers instead of ibuffer-map-marked-lines.
Append to kill ring when last command was a kill-region.
(ibuffer-copy-filename-as-kill): Idem.
Simplify the code.
Use ibuffer-buffer-file-name instead of buffer-file-name to
include buffers in Dired mode.
lisp/ibuf-ext.el
lisp/ibuffer.el