On 11/04/2024 09:55, Eli Zaretskii wrote: >> Cc: 48356@debbugs.gnu.org, Daniel Mendler , >> JD Smith , Juri Linkov >> Date: Thu, 11 Apr 2024 04:00:35 +0300 >> From: Dmitry Gutov >> >> All right, please see the new function completion-base-suffix added in >> 0288bc6c949. Any docstring improvements (and others) are welcome. > > I tried to do that. > > Is there any reason why this function shouldn't be called > completion-boundary-suffix instead? > >> I guess we should also mention it in NEWS... > > Yes, please. Sorry about the trouble, here is the next patch on top which essentially had to change the function's semantics to match the name above, except it needed just the length. Since that made it a very thin wrapper, I'm inlining the code back, no docstring or announcement needed. What else this patch does: * Removes the variables completion-use-base-affixes and completion-base-affixes, just using the completion-base-position variable, although with a marker for the field end. * Changes 'completion--replace' to preserve the said marker. The result is that the text outside of the current field boundaries is maintained for both minibuffer and in-buffer completion (in particular, the suffix). As one downside, it brings back behavior described in https://debbugs.gnu.org/34517#14. That doesn't seem too critical to me, but opinions might vary. So more feedback welcome. Also Cc'ing Visuwesh who filed bug#49931 (related).