emacs-devel
[Top][All Lists]
Advanced

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

Re: delete-file default to buffer-file-name if non-nil


From: Juri Linkov
Subject: Re: delete-file default to buffer-file-name if non-nil
Date: Wed, 19 May 2010 01:38:09 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (x86_64-pc-linux-gnu)

> (4) don't use the default value when RET is typed with empty input.

This means using the same UI as is used by `find-file...'
with a function like `find-file-read-args' in the interactive spec:

=== modified file 'src/fileio.c'
--- src/fileio.c        2010-05-08 18:47:07 +0000
+++ src/fileio.c        2010-05-18 22:37:17 +0000
@@ -2194,7 +2194,10 @@ (directory-file-name (file-name-director
   return Qnil;
 }
 
-DEFUN ("delete-file", Fdelete_file, Sdelete_file, 1, 2, "fDelete file: \nP",
+DEFUN ("delete-file", Fdelete_file, Sdelete_file, 1, 2,
+       "(list (read-file-name \"Delete file: \" nil default-directory \
+                (confirm-nonexistent-file-or-buffer))                 \
+              current-prefix-arg)",
        doc: /* Delete file named FILENAME.  If it is a symlink, remove the 
symlink.
 If file has multiple names, it continues to exist with the other names.

-- 
Juri Linkov
http://www.jurta.org/emacs/



reply via email to

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