I tried this now, and the bug does not seem to happen. Does it still fail for you?
(defadvice read-file-name (around read-filename-advice activate) "Tell `exit-minibuffer' to run a hook." (let ((minibuffer-exit-hook (append minibuffer-exit-hook '(my-minibuffer-hook)))) ad-do-it)) (defun my-minibuffer-hook () "Manipulate the minibuffer before exiting it." (goto-char (minibuffer-prompt-end)) (end-of-line) (message "current point: %d " (point)) (message "max point: %d " (point-max)) ) Then evaluate (read-file-name "foo") for instance, with C-cC-e When you see a prompt, type something at the end. For instance, type ~/.emacs to the end of the stuff that shows in the minibuffer. You will see (in *Messages*) that current point and max point are different! The current point will be at the end of the prompt instead of at the end of what you typed. Now, if you remove (goto-char (minibuffer-prompt-end)) at the beginning of the hook and repeat the experiment then you will see that the current point and the max point are the same. So, something gets messed up. _______________________________________________ emacs-pretest-bug mailing list emacs-pretest-bug@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug