GNU bug report logs -
#78719
30.1; [PATCH] Add functions `string-common-prefix' and `string-try-completion'
Previous Next
Full log
Message #86 received at 78719 <at> debbugs.gnu.org (full text, mbox):
Phil Sainty <psainty <at> orcon.net.nz> writes:
> I accept that I've not swayed anyone to my viewpoint, though, so I'm
> going to remove the filter arguments and reduce the function to the
> simplest case.
Let me clarify - my viewpoint is that the following calling conventions
are acceptable:
(string-common-prefix LIST &optional IGNORE-CASE) ;; favored
(string-common-prefix LIST &optional IGNORE-CASE STRING REGEXP-LIST)
(string-common-prefix LIST &optional IGNORE-CASE REGEXP-LIST STRING)
This means I am not strongly opposed to the addition of the filter
arguments REGEXP-LIST and STRING, as long as they are given lower
priority.
I still favor (string-common-prefix LIST &optional IGNORE-CASE) since I
am not convinced that there are many call sites where the additional
arguments would be needed, and in the few cases, `try-completion' would
just do. But then I cannot say this with certainty. You've shown your
snippet and there it would be handy to have REGEXP-LIST. Also Emacs APIs
have the tendency to acquire arguments over time, so these arguments
could get added sooner or later anyway, by someone who hasn't read the
discussion, and then I don't really want to discuss this again. Also
extending APIs leads to additional effort for the Compat package, which
I maintain, so we could go directly with the four argument calling
convention.
Daniel
This bug report was last modified 57 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.