Commit 17aa3385 authored by Kim F. Storm's avatar Kim F. Storm
Browse files

(choose-completion-string): Set buffer before running

choose-completion-string-functions hook so it can be buffer-local.
parent f2e92e79
......@@ -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
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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment