aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2014-05-26 18:25:57 -0700
committerGlenn Morris2014-05-26 18:25:57 -0700
commit4a12fa5c2e0d69d3dfbf94c9367006ab545e93cc (patch)
treea8ee6bf32a3c4c9e690809db77a65d934ea8c814
parente38a5ebe6b225ecb31008cafcbd51d85c2305618 (diff)
downloademacs-4a12fa5c2e0d69d3dfbf94c9367006ab545e93cc.tar.gz
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.texi1
-rw-r--r--lisp/ChangeLog3
-rw-r--r--lisp/minibuffer.el15
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
240completing-read-function 240completing-read-function
241completion-annotate-function 241completion-annotate-function
242completion-at-point-functions 242completion-at-point-functions
243completion-in-region-functions
244completion-list-insert-choice-function 243completion-list-insert-choice-function
245deactivate-current-input-method-function 244deactivate-current-input-method-function
246describe-current-input-method-function 245describe-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 @@
12014-05-27 Glenn Morris <rgm@gnu.org> 12014-05-27 Glenn Morris <rgm@gnu.org>
2 2
3 * minibuffer.el (completion-in-region-functions, completion-in-region)
4 (completion--in-region): Doc fixes.
5
3 * abbrev.el (abbrev-expand-functions, abbrev-expand-function) 6 * abbrev.el (abbrev-expand-functions, abbrev-expand-function)
4 (expand-abbrev, abbrev--default-expand): Doc fixes. 7 (expand-abbrev, abbrev--default-expand): Doc fixes.
5 8
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.")
1876 (exit-minibuffer)) 1876 (exit-minibuffer))
1877 1877
1878(defvar completion-in-region-functions nil 1878(defvar completion-in-region-functions nil
1879 "Wrapper hook around `completion-in-region'.") 1879 "Wrapper hook around `completion--in-region'.")
1880(make-obsolete-variable 'completion-in-region-functions 1880(make-obsolete-variable 'completion-in-region-functions
1881 'completion-in-region-function "24.4") 1881 'completion-in-region-function "24.4")
1882 1882
1883(defvar completion-in-region-function #'completion--in-region 1883(defvar completion-in-region-function #'completion--in-region
1884 "Function to perform the job of `completion-in-region'. 1884 "Function to perform the job of `completion-in-region'.
1885The function is called with 4 arguments: START END COLLECTION PREDICATE. 1885The function is called with 4 arguments: START END COLLECTION PREDICATE.
1886The arguments and expected return value are like the ones of 1886The arguments and expected return value are as specified for
1887`completion-in-region'.") 1887`completion-in-region'.")
1888 1888
1889(defvar completion-in-region--data nil) 1889(defvar completion-in-region--data nil)
@@ -1901,10 +1901,12 @@ we entered `completion-in-region-mode'.")
1901 1901
1902(defun completion-in-region (start end collection &optional predicate) 1902(defun completion-in-region (start end collection &optional predicate)
1903 "Complete the text between START and END using COLLECTION. 1903 "Complete the text between START and END using COLLECTION.
1904Return nil if there is no valid completion, else t.
1905Point needs to be somewhere between START and END. 1904Point needs to be somewhere between START and END.
1906PREDICATE (a function called with no arguments) says when to 1905PREDICATE (a function called with no arguments) says when to exit.
1907exit." 1906This calls the function that `completion-in-region-function' specifies
1907\(passing the same four arguments that it received) to do the work,
1908and returns whatever it does. The return value should be nil
1909if there was no valid completion, else t."
1908 (cl-assert (<= start (point)) (<= (point) end)) 1910 (cl-assert (<= start (point)) (<= (point) end))
1909 (funcall completion-in-region-function start end collection predicate)) 1911 (funcall completion-in-region-function start end collection predicate))
1910 1912
@@ -1916,6 +1918,9 @@ exit."
1916 :version "22.1") 1918 :version "22.1")
1917 1919
1918(defun completion--in-region (start end collection &optional predicate) 1920(defun completion--in-region (start end collection &optional predicate)
1921 "Default function to use for `completion-in-region-function'.
1922Its arguments and return value are as specified for `completion-in-region'.
1923This respects the wrapper hook `completion-in-region-functions'."
1919 (with-wrapper-hook 1924 (with-wrapper-hook
1920 ;; FIXME: Maybe we should use this hook to provide a "display 1925 ;; FIXME: Maybe we should use this hook to provide a "display
1921 ;; completions" operation as well. 1926 ;; completions" operation as well.