diff options
author | Tino Calancha <tino.calancha@gmail.com> | 2016-07-03 14:11:49 +0900 |
---|---|---|
committer | Tino Calancha <tino.calancha@gmail.com> | 2016-07-03 14:11:49 +0900 |
commit | 0d06e94309fc2f296741a06394413209b45433cd (patch) | |
tree | afb3a7224992f7fc2d5e7372a17e7693e5c44a03 | |
parent | da2512f24c5772476671202bf6106f63983e22e4 (diff) |
ibuffer-copy-filename-as-kill verbosity increase
* lisp/ibuf-ext.el (ibuffer-copy-filename-as-kill):
Use shorter name, result, for a local bound var.
Show the string result in the echo area.
-rw-r--r-- | lisp/ibuf-ext.el | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el index 0baab6b2f2..d4fd09f2cc 100644 --- a/lisp/ibuf-ext.el +++ b/lisp/ibuf-ext.el @@ -1406,7 +1406,7 @@ You can then feed the file name(s) to other commands with \\[yank]." (interactive "p") (if (zerop (ibuffer-count-marked-lines)) (message "No buffers marked; use 'm' to mark a buffer") - (let ((ibuffer-copy-filename-as-kill-result "") + (let ((result "") (type (cond ((or (null arg) (zerop arg)) 'full) ((= arg 4) @@ -1415,8 +1415,8 @@ You can then feed the file name(s) to other commands with \\[yank]." 'name)))) (ibuffer-map-marked-lines #'(lambda (buf _mark) - (setq ibuffer-copy-filename-as-kill-result - (concat ibuffer-copy-filename-as-kill-result + (setq result + (concat result (let ((name (buffer-file-name buf))) (cond (name (concat @@ -1430,10 +1430,11 @@ You can then feed the file name(s) to other commands with \\[yank]." (_ (file-name-nondirectory name))) " ")) (t ""))))))) - (when (not (zerop (length ibuffer-copy-filename-as-kill-result))) - (setq ibuffer-copy-filename-as-kill-result - (substring ibuffer-copy-filename-as-kill-result 0 -1))) - (kill-new ibuffer-copy-filename-as-kill-result)))) + (when (not (zerop (length result))) + (setq result + (substring result 0 -1))) + (kill-new result) + (message "%s" result)))) (defun ibuffer-mark-on-buffer (func &optional ibuffer-mark-on-buffer-mark group) (let ((count |