From: Tino Calancha Date: Sat, 30 Jul 2016 08:26:19 +0000 (+0900) Subject: Copy just non-empty strings to kill-ring X-Git-Tag: emacs-26.0.90~1837 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=d81dc05258963d88725a684a6fb1d6ee07eaca1f;p=emacs.git Copy just non-empty strings to kill-ring * lisp/dired.el (dired-copy-filename-as-kill): Do not change the kill ring when the string is empty (Bug#24103). --- diff --git a/lisp/dired.el b/lisp/dired.el index 5d14291d787..7ead0876fc8 100644 --- a/lisp/dired.el +++ b/lisp/dired.el @@ -2467,10 +2467,11 @@ You can then feed the file name(s) to other commands with \\[yank]." 'no-dir (prefix-numeric-value arg)))) (dired-get-marked-files 'no-dir)) " ")))) - (if (eq last-command 'kill-region) - (kill-append string nil) - (kill-new string)) - (message "%s" string))) + (unless (string= string "") + (if (eq last-command 'kill-region) + (kill-append string nil) + (kill-new string)) + (message "%s" string)))) ;; Keeping Dired buffers in sync with the filesystem and with each other