aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim F. Storm2004-09-12 18:52:03 +0000
committerKim F. Storm2004-09-12 18:52:03 +0000
commit17aa33855f4600aa7ca9cf00f4cb9f98a9720c61 (patch)
tree0a03056e23fb742bcf899163743ecebb93adbd7e
parentf2e92e79546e9adc949ccf4608f64e9558d8cdf3 (diff)
downloademacs-17aa33855f4600aa7ca9cf00f4cb9f98a9720c61.tar.gz
emacs-17aa33855f4600aa7ca9cf00f4cb9f98a9720c61.zip
(choose-completion-string): Set buffer before running
choose-completion-string-functions hook so it can be buffer-local.
-rw-r--r--lisp/simple.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/simple.el b/lisp/simple.el
index 75d2cef8499..e7498d67789 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -4297,11 +4297,12 @@ to decide what to delete."
4297 (not (equal buffer 4297 (not (equal buffer
4298 (window-buffer (active-minibuffer-window)))))) 4298 (window-buffer (active-minibuffer-window))))))
4299 (error "Minibuffer is not active for completion") 4299 (error "Minibuffer is not active for completion")
4300 ;; Set buffer so buffer-local choose-completion-string-functions works.
4301 (set-buffer buffer)
4300 (unless (run-hook-with-args-until-success 4302 (unless (run-hook-with-args-until-success
4301 'choose-completion-string-functions 4303 'choose-completion-string-functions
4302 choice buffer mini-p base-size) 4304 choice buffer mini-p base-size)
4303 ;; Insert the completion into the buffer where it was requested. 4305 ;; Insert the completion into the buffer where it was requested.
4304 (set-buffer buffer)
4305 (if base-size 4306 (if base-size
4306 (delete-region (+ base-size (if mini-p 4307 (delete-region (+ base-size (if mini-p
4307 (minibuffer-prompt-end) 4308 (minibuffer-prompt-end)