emacs-devel
[Top][All Lists]
Advanced

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

Re: master e315544: ; * src/fileio.c (Fdirectory_append): Doc fix.


From: Michael Albinus
Subject: Re: master e315544: ; * src/fileio.c (Fdirectory_append): Doc fix.
Date: Sat, 24 Jul 2021 20:39:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

eliz@gnu.org (Eli Zaretskii) writes:

> diff --git a/src/fileio.c b/src/fileio.c
> index 6d505fd..d6b3e7b 100644
> --- a/src/fileio.c
> +++ b/src/fileio.c
> @@ -751,9 +751,10 @@ For that reason, you should normally use 
> `make-temp-file' instead.  */)
>
>  DEFUN ("directory-append", Fdirectory_append, Sdirectory_append, 1, MANY, 0,
>         doc: /* Append COMPONENTS to DIRECTORY and return the resulting 
> string.
> -COMPONENTS must be a list of strings.  DIRECTORY or the non-final
> -elements in COMPONENTS may or may not end with a slash -- if they don't
> -end with a slash, a slash will be inserted before contatenating.
> +COMPONENTS must be strings.
> +DIRECTORY or the non-final elements in COMPONENTS may or may not end
> +with a slash -- if they don't end with a slash, a slash will be
> +inserted before contatenating.
>  usage: (record DIRECTORY &rest COMPONENTS) */)
>    (ptrdiff_t nargs, Lisp_Object *args)
>  {

FTR, I believe COMPONENTS might also contain nil elements, which should
be ignored.

Furthermore, we have

(directory-append "foo/" "/bar") => "foo//bar"

I would expect "foo/bar", meaning that all leading slashes in COMPONENTS
are removed.

Best regards, Michael.



reply via email to

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