summaryrefslogtreecommitdiff
path: root/etc
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-05-23 23:45:50 -0300
committerStefan Monnier <monnier@iro.umontreal.ca>2011-05-23 23:45:50 -0300
commitd12e60a415d99fd5ebb8e4bd452f2feb142f8d00 (patch)
treef9931bae876272e6799aeb94123486c812200ac2 /etc
parent221b612d2ec2688175353ba3d6779865a1031246 (diff)
downloademacs-d12e60a415d99fd5ebb8e4bd452f2feb142f8d00.tar.gz
Add an :exit-function for completion-at-point.
* lisp/minibuffer.el (completion--done): New fun. (completion--do-completion): Use it. New arg `expect-exact'. (minibuffer-complete, minibuffer-complete-word): Don't output message, since completion--do-completion does it for us now. (minibuffer-force-complete): Use completion--done and completion--replace. Handle sole-completion case with more care. (minibuffer-complete-and-exit): Use new `expect-exact' arg. (completion-extra-properties): New var. (completion-annotate-function): Make obsolete. (minibuffer-completion-help): Adjust accordingly. Use completion-list-insert-choice-function. (completion-at-point, completion-help-at-point): Bind completion-extra-properties. (completion-pcm-word-delimiters): Add | (for uniquify, for example). * lisp/simple.el (completion-list-insert-choice-function): New var. (completion-setup-function): Preserve it. (choose-completion): Pay attention to it, shuffle the code a bit. (choose-completion-string): New arg `insert-function'. * lisp/textmodes/bibtex.el: Convert to lexical binding. (bibtex-mode-map): Use completion-at-point. (bibtex-mode): Use define-derived-mode&completion-at-point-functions. (bibtex-completion-at-point-function): New fun, from bibtex-complete. (bibtex-complete): Define as obsolete alias. (bibtex-complete-internal): Remove. (bibtex-format-entry): Remove unused sub-group in regexp. * lisp/shell.el (shell--command-completion-data) (shell-environment-variable-completion): * lisp/pcomplete.el (pcomplete-completions-at-point): * lisp/comint.el (comint--complete-file-name-data): Use :exit-function instead of completion-table-with-terminator so it also works for choose-completion.
Diffstat (limited to 'etc')
-rw-r--r--etc/NEWS29
1 files changed, 22 insertions, 7 deletions
diff --git a/etc/NEWS b/etc/NEWS
index 98a66259db0..64313480efb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -68,9 +68,6 @@ and also when HOME is set to C:\ by default.
* Changes in Emacs 24.1
-** Completion in a non-minibuffer now tries to detect the end of completion
-and pops down the *Completions* buffer accordingly.
-
** emacsclient changes
*** New emacsclient argument --parent-id ID can be used to open a
@@ -83,9 +80,18 @@ client frame in parent X window ID, via XEmbed. This works like the
*** If emacsclient shuts down as a result of Emacs signalling an
error, its exit status is 1.
-** Completion can cycle, depending on completion-cycle-threshold.
+** Completion
+*** Many packages have been changed to use completion-at-point rather than
+their own completion code.
+
+*** Completion in a non-minibuffer now tries to detect the end of completion
+and pops down the *Completions* buffer accordingly.
+
+*** Completion can cycle, depending on completion-cycle-threshold.
-** `completing-read' can be customized using the new variable
+*** New completion style `substring'.
+
+*** `completing-read' can be customized using the new variable
`completing-read-function'.
** auto-mode-case-fold is now enabled by default.
@@ -833,6 +839,17 @@ sc.el, x-menu.el, rnews.el, rnewspost.el
* Lisp changes in Emacs 24.1
+** Completion
+*** New variable completion-extra-properties used to specify extra properties
+of the current completion:
+- :annotate-function, same as the old completion-annotate-function.
+- :exit-function, function to call after completion took place.
+
+*** Functions on completion-at-point-functions can return any of the properties
+valid for completion-extra-properties.
+
+*** completion-annotate-function is obsolete.
+
** `glyphless-char-display' can now distinguish between graphical and
text terminal display, via a char-table entry that is a cons cell.
@@ -909,8 +926,6 @@ argument is supplied (see Trash changes, above).
** buffer-substring-filters is obsoleted by filter-buffer-substring-functions.
-** New completion style `substring'.
-
** `facemenu-read-color' is now an alias for `read-color'.
The command `read-color' now requires a match for a color name or RGB
triplet, instead of signalling an error if the user provides a invalid