unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Albinus <michael.albinus@gmx.de>
To: emacs-devel@gnu.org
Cc: Eli Zaretskii <eliz@gnu.org>, Lars Ingebrigtsen <larsi@gnus.org>
Subject: Re: master e315544: ; * src/fileio.c (Fdirectory_append): Doc fix.
Date: Sat, 24 Jul 2021 20:39:58 +0200	[thread overview]
Message-ID: <87h7gjo8sh.fsf@gmx.de> (raw)
In-Reply-To: <20210724171900.4A26D20D0A@vcs0.savannah.gnu.org> (Eli Zaretskii's message of "Sat, 24 Jul 2021 13:18:59 -0400 (EDT)")

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	other threads:[~2021-07-24 18:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20210724171858.1726.43078@vcs0.savannah.gnu.org>
     [not found] ` <20210724171900.4A26D20D0A@vcs0.savannah.gnu.org>
2021-07-24 18:39   ` Michael Albinus [this message]
2021-07-24 18:51     ` master e315544: ; * src/fileio.c (Fdirectory_append): Doc fix Lars Ingebrigtsen
2021-07-24 19:04       ` Michael Albinus
2021-07-25  5:19         ` Lars Ingebrigtsen
2021-07-25  5:27           ` Stefan Monnier
2021-07-25  6:54             ` Lars Ingebrigtsen
2021-07-25 10:01               ` Kévin Le Gouguec
2021-07-25 10:23                 ` Lars Ingebrigtsen
2021-07-25 11:50                 ` Andreas Schwab
2021-07-25 13:05                   ` Kévin Le Gouguec
2021-07-28 15:39                     ` Lars Ingebrigtsen
2021-07-28 17:28                       ` Michael Albinus
2021-07-30 11:36                         ` Lars Ingebrigtsen
2021-07-25  7:59           ` Michael Albinus
2021-07-28 15:36             ` Lars Ingebrigtsen
2021-07-28 17:13               ` Michael Albinus

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=87h7gjo8sh.fsf@gmx.de \
    --to=michael.albinus@gmx.de \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=larsi@gnus.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).