From: Po Lu <luangruo@yahoo.com>
To: emacs-devel@gnu.org
Cc: "Eric S. Raymond" <esr@thyrsus.com>
Subject: Re: master 10a7615b5d4: Separate filename-deletion mechanism from policy.
Date: Sun, 06 Aug 2023 21:37:21 +0800 [thread overview]
Message-ID: <87jzu847hq.fsf@yahoo.com> (raw)
In-Reply-To: <20230806133211.6301AC038BE@vcs2.savannah.gnu.org> (Eric S. Raymond's message of "Sun, 6 Aug 2023 09:32:11 -0400 (EDT)")
"Eric S. Raymond" <esr@thyrsus.com> writes:
> This is a pure refactoring step, delete-file's behavior is
> unchanged. But the C core is a little simpler now.
> ---
> lisp/files.el | 20 ++++++++++++++++++++
> src/fileio.c | 40 +++++++++-------------------------------
> 2 files changed, 29 insertions(+), 31 deletions(-)
>
> diff --git a/lisp/files.el b/lisp/files.el
> index f8867432000..84a8c308b09 100644
> --- a/lisp/files.el
> +++ b/lisp/files.el
> @@ -6352,6 +6352,26 @@ non-nil and if FN fails due to a missing file or directory."
> (apply fn args)
> (file-missing (or no-such (signal (car err) (cdr err))))))
>
> +(defun delete-file (filename &optional trash)
> + "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.q
^
Typo alert!
Thanks. While I'm not enthusiastic about moving functions from C to
Lisp, others seem to appreciate the gesture, so I won't mention this
subject now.
However,
> branch: master
> commit 10a7615b5d45bcd909bb03d67423b337dfe93b1e
> Author: Eric S. Raymond <esr@thyrsus.com>
> Commit: Eric S. Raymond <esr@thyrsus.com>
>
> Separate filename-deletion mechanism from policy.
>
> src/fileio.c: (delete-file-internal) Renamed from delete-file,
> parallel to delete-directory-internal; policy
> code moved to Lisp.
> src/files.el: (delete-file) New function, holds policy logic.
> calls delete-file-internal.
is incorrect, since our ChangeLog generator expects the entries to be
formatted like so:
* src/fileio.c (delete-file-internal): Renamed from delete-file,
its counterpart being delete-directory-internal; policy code
moved to Lisp.
* src/files.el (delete-file): ...
next parent reply other threads:[~2023-08-06 13:37 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <169132873104.29568.5167661370136073295@vcs2.savannah.gnu.org>
[not found] ` <20230806133211.6301AC038BE@vcs2.savannah.gnu.org>
2023-08-06 13:37 ` Po Lu [this message]
2023-08-06 14:12 ` master 10a7615b5d4: Separate filename-deletion mechanism from policy Eli Zaretskii
2023-08-07 15:21 ` Andrea Corallo
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87jzu847hq.fsf@yahoo.com \
--to=luangruo@yahoo.com \
--cc=emacs-devel@gnu.org \
--cc=esr@thyrsus.com \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.