From 17aa33855f4600aa7ca9cf00f4cb9f98a9720c61 Mon Sep 17 00:00:00 2001 From: "Kim F. Storm" Date: Sun, 12 Sep 2004 18:52:03 +0000 Subject: [PATCH] (choose-completion-string): Set buffer before running choose-completion-string-functions hook so it can be buffer-local. --- lisp/simple.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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." (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) -- 2.39.5