/[emacs]/emacs/lisp/dired-x.el
ViewVC logotype

Diff of /emacs/lisp/dired-x.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.42 by gerd, Mon Oct 29 11:39:24 2001 UTC revision 1.43 by rms, Mon Dec 17 01:55:53 2001 UTC
# Line 460  buffer and try again." Line 460  buffer and try again."
460    (interactive)    (interactive)
461    (dired-jump t))    (dired-jump t))
462    
 ;;; COPY NAMES OF MARKED FILES INTO KILL-RING.  
   
 (defun dired-copy-filename-as-kill (&optional arg)  
   "Copy names of marked (or next ARG) files into the kill ring.  
 The names are separated by a space.  
 With a zero prefix arg, use the complete pathname of each marked file.  
 With \\[universal-argument], use the relative pathname of each marked file.  
   
 If on a subdir headerline, use subdirname instead; prefix arg is ignored  
 in this case.  
   
 You can then feed the file name(s) to other commands with \\[yank]."  
   (interactive "P")  
   (let ((string  
          (or (dired-get-subdir)  
              (mapconcat (function identity)  
                         (if arg  
                             (cond ((zerop (prefix-numeric-value arg))  
                                    (dired-get-marked-files))  
                                   ((integerp arg)  
                                    (dired-get-marked-files 'no-dir arg))  
                                   (t    ; else a raw arg  
                                    (dired-get-marked-files t)))  
                           (dired-get-marked-files 'no-dir))  
                         " "))))  
     (kill-new string)  
     (message "%s" string)))  
   
   
463  ;;; OMITTING.  ;;; OMITTING.
464    
465  ;;; Enhanced omitting of lines from directory listings.  ;;; Enhanced omitting of lines from directory listings.

Legend:
Removed from v.1.42  
changed lines
  Added in v.1.43

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26