minibuffer-completion-table
;; If this is reading a file name, and the file name chosen
;; is a directory, don't exit the minibuffer.
- (if (and (eq minibuffer-completion-table 'read-file-name-internal)
+ (if (and minibuffer-completing-file-name
(file-directory-p (field-string (point-max))))
(let ((mini (active-minibuffer-window)))
(select-window mini)