# HG changeset patch # User Kim F. Storm # Date 1095015123 0 # Node ID eadbbac3807494c6acd2ed9c8e772fcf4c9e15b1 # Parent f728de462db7189e7a8dd57f0adb2448b1c534d5 (choose-completion-string): Set buffer before running choose-completion-string-functions hook so it can be buffer-local. diff -r f728de462db7 -r eadbbac38074 lisp/simple.el --- a/lisp/simple.el Sun Sep 12 18:51:22 2004 +0000 +++ b/lisp/simple.el Sun Sep 12 18:52:03 2004 +0000 @@ -4297,11 +4297,12 @@ (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)