emacs-diffs
[Top][All Lists]
Advanced

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

master 3995f05 2/2: Expand documentation on nontrivial completion bounda


From: Philipp Stephani
Subject: master 3995f05 2/2: Expand documentation on nontrivial completion boundaries.
Date: Fri, 23 Apr 2021 07:03:08 -0400 (EDT)

branch: master
commit 3995f0515ab0b0e359f9976d589eed45f38eaa6d
Author: Philipp Stephani <phst@google.com>
Commit: Philipp Stephani <phst@google.com>

    Expand documentation on nontrivial completion boundaries.
    
    The interplay between nontrivial completion boundaries and the other
    completion functions is somewhat subtle, so it deserves a bit more
    explanation.
    
    * doc/lispref/minibuf.texi (Basic Completion)
    (Programmed Completion): Add a few more remarks about nontrivial
    completion boundaries.
---
 doc/lispref/minibuf.texi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index f012bfe..faee43b 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -990,6 +990,9 @@ Also @code{all-completions} on @code{"/usr/sh"} will not 
include
 @code{completion-boundaries} will return @code{(5 . 1)} which tells us
 that the @var{collection} will only return completion information that
 pertains to the area after @code{"/usr/"} and before @code{"/doc"}.
+@code{try-completion} is not affected by nontrivial boundaries; i.e.,
+@code{try-completion} on @code{"/usr/sh"} might still return
+@code{"/usr/share/"}, not @code{"share/"}.
 @end defun
 
 If you store a completion alist in a variable, you should mark the
@@ -1894,6 +1897,13 @@ should return @code{(boundaries @var{start} . 
@var{end})}, where
 string, and @var{end} is the position of the end boundary in
 @var{suffix}.
 
+If you return nontrivial boundaries, make sure that the
+@code{all-completions} operation is consistent with them.  The
+completions returned by @code{all-completions} should only pertain to
+the piece of the prefix and suffix covered by the completion
+boundaries.  @ref{Basic Completion} for the precise expected semantics
+of completion boundaries.
+
 @item metadata
 This specifies a request for information about the state of the
 current completion.  The return value should have the form



reply via email to

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