diff options
author | Stefan Monnier <[email protected]> | 2011-05-23 23:45:50 -0300 |
---|---|---|
committer | Stefan Monnier <[email protected]> | 2011-05-23 23:45:50 -0300 |
commit | a2a25d24350857dda87e28d6b2695cccc41bb32e (patch) | |
tree | 59bf876837e64b92932a52bf8ea8c526de285eb1 /etc/NEWS | |
parent | 2df215b52612a739eedcc024e47b6a9fa720dfda (diff) |
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/NEWS')
-rw-r--r-- | etc/NEWS | 29 |
1 files changed, 22 insertions, 7 deletions
@@ -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 |