[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] master 1158df5: Improve the doc string of 'completion-boun
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] master 1158df5: Improve the doc string of 'completion-boundaries' |
Date: |
Fri, 16 Oct 2015 13:43:14 +0000 |
branch: master
commit 1158df5f677c1c9ac8649910a680c17b53452753
Author: Eli Zaretskii <address@hidden>
Commit: Eli Zaretskii <address@hidden>
Improve the doc string of 'completion-boundaries'
* lisp/minibuffer.el (completion-boundaries): Rename the argument
TABLE to COLLECTION, for consistency with other high-level
completion functions. Document how COLLECTION is called if it
is a function. (Bug#21644)
---
lisp/minibuffer.el | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index 2814d02..6123750 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -92,18 +92,21 @@
;;; Completion table manipulation
;; New completion-table operation.
-(defun completion-boundaries (string table pred suffix)
- "Return the boundaries of the completions returned by TABLE for STRING.
+(defun completion-boundaries (string collection pred suffix)
+ "Return the boundaries of text on which COLLECTION will operate.
STRING is the string on which completion will be performed.
SUFFIX is the string after point.
+If COLLECTION is a function, it is called with 3 arguments: STRING,
+PRED, and a cons cell of the form (boundaries . SUFFIX).
+
The result is of the form (START . END) where START is the position
in STRING of the beginning of the completion field and END is the position
in SUFFIX of the end of the completion field.
E.g. for simple completion tables, the result is always (0 . (length SUFFIX))
and for file names the result is the positions delimited by
the closest directory separators."
- (let ((boundaries (if (functionp table)
- (funcall table string pred
+ (let ((boundaries (if (functionp collection)
+ (funcall collection string pred
(cons 'boundaries suffix)))))
(if (not (eq (car-safe boundaries) 'boundaries))
(setq boundaries nil))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] master 1158df5: Improve the doc string of 'completion-boundaries',
Eli Zaretskii <=