diff options
author | Glenn Morris <rgm@gnu.org> | 2014-05-26 18:25:57 -0700 |
---|---|---|
committer | Glenn Morris <rgm@gnu.org> | 2014-05-26 18:25:57 -0700 |
commit | 4a12fa5c2e0d69d3dfbf94c9367006ab545e93cc (patch) | |
tree | a8ee6bf32a3c4c9e690809db77a65d934ea8c814 | |
parent | e38a5ebe6b225ecb31008cafcbd51d85c2305618 (diff) | |
download | emacs-4a12fa5c2e0d69d3dfbf94c9367006ab545e93cc.tar.gz emacs-4a12fa5c2e0d69d3dfbf94c9367006ab545e93cc.tar.bz2 emacs-4a12fa5c2e0d69d3dfbf94c9367006ab545e93cc.zip |
Doc updates re completion-in-region-function
* lisp/minibuffer.el (completion-in-region-functions, completion-in-region)
(completion--in-region): Doc fixes.
* doc/lispref/hooks.texi: Update comment.
-rw-r--r-- | doc/lispref/hooks.texi | 1 | ||||
-rw-r--r-- | lisp/ChangeLog | 3 | ||||
-rw-r--r-- | lisp/minibuffer.el | 15 |
3 files changed, 13 insertions, 6 deletions
diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index 79704f3c509..19e30163590 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -240,7 +240,6 @@ choose-completion-string-functions completing-read-function completion-annotate-function completion-at-point-functions -completion-in-region-functions completion-list-insert-choice-function deactivate-current-input-method-function describe-current-input-method-function diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 60b684fd8ad..13f68a4f476 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2014-05-27 Glenn Morris <rgm@gnu.org> + * minibuffer.el (completion-in-region-functions, completion-in-region) + (completion--in-region): Doc fixes. + * abbrev.el (abbrev-expand-functions, abbrev-expand-function) (expand-abbrev, abbrev--default-expand): Doc fixes. diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el index dc3daa386d2..e63c85c98d0 100644 --- a/lisp/minibuffer.el +++ b/lisp/minibuffer.el @@ -1876,14 +1876,14 @@ variables.") (exit-minibuffer)) (defvar completion-in-region-functions nil - "Wrapper hook around `completion-in-region'.") + "Wrapper hook around `completion--in-region'.") (make-obsolete-variable 'completion-in-region-functions 'completion-in-region-function "24.4") (defvar completion-in-region-function #'completion--in-region "Function to perform the job of `completion-in-region'. The function is called with 4 arguments: START END COLLECTION PREDICATE. -The arguments and expected return value are like the ones of +The arguments and expected return value are as specified for `completion-in-region'.") (defvar completion-in-region--data nil) @@ -1901,10 +1901,12 @@ we entered `completion-in-region-mode'.") (defun completion-in-region (start end collection &optional predicate) "Complete the text between START and END using COLLECTION. -Return nil if there is no valid completion, else t. Point needs to be somewhere between START and END. -PREDICATE (a function called with no arguments) says when to -exit." +PREDICATE (a function called with no arguments) says when to exit. +This calls the function that `completion-in-region-function' specifies +\(passing the same four arguments that it received) to do the work, +and returns whatever it does. The return value should be nil +if there was no valid completion, else t." (cl-assert (<= start (point)) (<= (point) end)) (funcall completion-in-region-function start end collection predicate)) @@ -1916,6 +1918,9 @@ exit." :version "22.1") (defun completion--in-region (start end collection &optional predicate) + "Default function to use for `completion-in-region-function'. +Its arguments and return value are as specified for `completion-in-region'. +This respects the wrapper hook `completion-in-region-functions'." (with-wrapper-hook ;; FIXME: Maybe we should use this hook to provide a "display ;; completions" operation as well. |