emacs-devel
[Top][All Lists]
Advanced

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

Re: master 10a7615b5d4: Separate filename-deletion mechanism from policy


From: Po Lu
Subject: Re: master 10a7615b5d4: Separate filename-deletion mechanism from policy.
Date: Sun, 06 Aug 2023 21:37:21 +0800
User-agent: Gnus/5.13 (Gnus v5.13)

"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): ...


reply via email to

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