emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 0d06e94: ibuffer-copy-filename-as-kill verbosity in


From: Tino Calancha
Subject: [Emacs-diffs] master 0d06e94: ibuffer-copy-filename-as-kill verbosity increase
Date: Sun, 3 Jul 2016 05:17:23 +0000 (UTC)

branch: master
commit 0d06e94309fc2f296741a06394413209b45433cd
Author: Tino Calancha <address@hidden>
Commit: Tino Calancha <address@hidden>

    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.
---
 lisp/ibuf-ext.el |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

diff --git a/lisp/ibuf-ext.el b/lisp/ibuf-ext.el
index 0baab6b..d4fd09f 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]