[Top][All Lists]

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

[Emacs-diffs] emacs-24 r117159: Doc updates re completion-in-region-func

From: Glenn Morris
Subject: [Emacs-diffs] emacs-24 r117159: Doc updates re completion-in-region-function
Date: Tue, 27 May 2014 01:26:06 +0000
User-agent: Bazaar (2.6b2)

revno: 117159
revision-id: address@hidden
parent: address@hidden
committer: Glenn Morris <address@hidden>
branch nick: emacs-24
timestamp: Mon 2014-05-26 18:25:57 -0700
  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.
  doc/lispref/hooks.texi         hooks.texi-20091113204419-o5vbwnq5f7feedwu-6186
  lisp/ChangeLog                 changelog-20091113204419-o5vbwnq5f7feedwu-1432
=== modified file 'doc/lispref/hooks.texi'
--- a/doc/lispref/hooks.texi    2014-03-07 15:11:12 +0000
+++ b/doc/lispref/hooks.texi    2014-05-27 01:25:57 +0000
@@ -240,7 +240,6 @@

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2014-05-27 01:09:45 +0000
+++ b/lisp/ChangeLog    2014-05-27 01:25:57 +0000
@@ -1,5 +1,8 @@
 2014-05-27  Glenn Morris  <address@hidden>
+       * 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.

=== modified file 'lisp/minibuffer.el'
--- a/lisp/minibuffer.el        2014-05-19 05:07:45 +0000
+++ b/lisp/minibuffer.el        2014-05-27 01:25:57 +0000
@@ -1876,14 +1876,14 @@
 (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
 (defvar completion-in-region--data nil)
@@ -1901,10 +1901,12 @@
 (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
+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 @@
   :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'."
       ;; FIXME: Maybe we should use this hook to provide a "display
       ;; completions" operation as well.

reply via email to

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