mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-24 07:20:37 +00:00
(choose-completion-string): Set buffer before running
choose-completion-string-functions hook so it can be buffer-local.
This commit is contained in:
parent
f2e92e7954
commit
17aa33855f
@ -4297,11 +4297,12 @@ to decide what to delete."
|
||||
(not (equal buffer
|
||||
(window-buffer (active-minibuffer-window))))))
|
||||
(error "Minibuffer is not active for completion")
|
||||
;; Set buffer so buffer-local choose-completion-string-functions works.
|
||||
(set-buffer buffer)
|
||||
(unless (run-hook-with-args-until-success
|
||||
'choose-completion-string-functions
|
||||
choice buffer mini-p base-size)
|
||||
;; Insert the completion into the buffer where it was requested.
|
||||
(set-buffer buffer)
|
||||
(if base-size
|
||||
(delete-region (+ base-size (if mini-p
|
||||
(minibuffer-prompt-end)
|
||||
|
Loading…
Reference in New Issue
Block a user