[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#66187: read-file-name unexpected behavior when MUSTMATCH is a functi
From: |
Eli Zaretskii |
Subject: |
bug#66187: read-file-name unexpected behavior when MUSTMATCH is a function |
Date: |
Wed, 04 Oct 2023 09:05:29 +0300 |
> From: Joseph Turner <joseph@breatheoutbreathe.in>
> Cc: michael_heerdegen@web.de, philipk@posteo.net, 66187@debbugs.gnu.org
> Date: Tue, 03 Oct 2023 13:43:56 -0700
>
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> Cc: philipk@posteo.net, 66187@debbugs.gnu.org
> >> Date: Tue, 26 Sep 2023 17:55:37 -0700
> >> From: Joseph Turner via "Bug reports for GNU Emacs,
> >> the Swiss army knife of text editors" <bug-gnu-emacs@gnu.org>
> >>
> >> > Finally, I think the docstring of `read-directory-name' needs to be
> >> > updated: it fails to mention that MUSTMATCH can be a function (the
> >> > argument is passed directly to `read-file-name').
> >>
> >> How about the attached patch?
> >
> > This is okay, except that we do document the other arguments. So why
> > not just copy/paste the description of MUSTMATCH from read-file-name
> > to read-directory-name instead?
>
> The read-file-name docstring for MUSTMATCH is lengthy, and duplicating
> it will mean that if read-file-name changes, we'll need to remember to
> change the docstring of read-directory-name.
That's true, but it doesn't sound like a grave problem to me. We have
the same duplication elsewhere, so this isn't a precedent. Moreover,
when a doc string is long and complicated, asking the reader to read
part of it elsewhere is also quite a hassle.
So I still think duplication is the lesser evil here.