diff options
| author | Glenn Morris | 2014-05-26 18:25:57 -0700 |
|---|---|---|
| committer | Glenn Morris | 2014-05-26 18:25:57 -0700 |
| commit | 4a12fa5c2e0d69d3dfbf94c9367006ab545e93cc (patch) | |
| tree | a8ee6bf32a3c4c9e690809db77a65d934ea8c814 | |
| parent | e38a5ebe6b225ecb31008cafcbd51d85c2305618 (diff) | |
| download | emacs-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.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 | |||
| 240 | completing-read-function | 240 | completing-read-function |
| 241 | completion-annotate-function | 241 | completion-annotate-function |
| 242 | completion-at-point-functions | 242 | completion-at-point-functions |
| 243 | completion-in-region-functions | ||
| 244 | completion-list-insert-choice-function | 243 | completion-list-insert-choice-function |
| 245 | deactivate-current-input-method-function | 244 | deactivate-current-input-method-function |
| 246 | describe-current-input-method-function | 245 | 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 @@ | |||
| 1 | 2014-05-27 Glenn Morris <rgm@gnu.org> | 1 | 2014-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'. |
| 1885 | The function is called with 4 arguments: START END COLLECTION PREDICATE. | 1885 | The function is called with 4 arguments: START END COLLECTION PREDICATE. |
| 1886 | The arguments and expected return value are like the ones of | 1886 | The 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. |
| 1904 | Return nil if there is no valid completion, else t. | ||
| 1905 | Point needs to be somewhere between START and END. | 1904 | Point needs to be somewhere between START and END. |
| 1906 | PREDICATE (a function called with no arguments) says when to | 1905 | PREDICATE (a function called with no arguments) says when to exit. |
| 1907 | exit." | 1906 | This calls the function that `completion-in-region-function' specifies |
| 1907 | \(passing the same four arguments that it received) to do the work, | ||
| 1908 | and returns whatever it does. The return value should be nil | ||
| 1909 | if 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'. | ||
| 1922 | Its arguments and return value are as specified for `completion-in-region'. | ||
| 1923 | This 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. |