unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Juri Linkov <juri@jurta.org>
To: "Drew Adams" <drew.adams@oracle.com>
Cc: emacs-devel@gnu.org, 'Stefan Monnier' <monnier@iro.umontreal.ca>,
	rms@gnu.org, deniz.a.m.dogan@gmail.com
Subject: Re: delete-file default to buffer-file-name if non-nil
Date: Wed, 19 May 2010 01:38:09 +0300	[thread overview]
Message-ID: <87ocgc3n0u.fsf@mail.jurta.org> (raw)
In-Reply-To: <87y6fii0rj.fsf@mail.jurta.org> (Juri Linkov's message of "Tue, 18 May 2010 02:09:20 +0300")

> (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	other threads:[~2010-05-18 22:38 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-15 18:05 delete-file default to buffer-file-name if non-nil Deniz Dogan
2010-05-15 18:30 ` Davis Herring
2010-05-15 22:10   ` Deniz Dogan
2010-05-16 20:04   ` Richard Stallman
2010-05-16 20:20     ` Drew Adams
2010-05-16 23:09       ` Juri Linkov
2010-05-17  0:28         ` Drew Adams
2010-05-17 13:51           ` Stefan Monnier
2010-05-17 14:56             ` Drew Adams
2010-05-17 16:15               ` Deniz Dogan
2010-05-17 23:09               ` Juri Linkov
2010-05-18 22:38                 ` Juri Linkov [this message]
2010-05-17 14:40       ` Richard Stallman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ocgc3n0u.fsf@mail.jurta.org \
    --to=juri@jurta.org \
    --cc=deniz.a.m.dogan@gmail.com \
    --cc=drew.adams@oracle.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    --cc=rms@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).