From: Kim F. Storm Date: Sun, 12 Sep 2004 18:52:03 +0000 (+0000) Subject: (choose-completion-string): Set buffer before running X-Git-Tag: ttn-vms-21-2-B4~4949 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=17aa33855f4600aa7ca9cf00f4cb9f98a9720c61;p=emacs.git (choose-completion-string): Set buffer before running choose-completion-string-functions hook so it can be buffer-local. --- 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)