Mercurial > emacs
comparison lisp/minibuffer.el @ 105824:06f1348e3279
* minibuffer.el (read-file-name): Don't use file dialogs for
remote directories (Bug#99).
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Mon, 02 Nov 2009 02:06:36 +0000 |
parents | 5041ae86859e |
children | 45b3f4e55e6e |
comparison
equal
deleted
inserted
replaced
105823:dd97d1526b9f | 105824:06f1348e3279 |
---|---|
1290 DIR should be an absolute directory name. It defaults to the value of | 1290 DIR should be an absolute directory name. It defaults to the value of |
1291 `default-directory'. | 1291 `default-directory'. |
1292 | 1292 |
1293 If this command was invoked with the mouse, use a graphical file | 1293 If this command was invoked with the mouse, use a graphical file |
1294 dialog if `use-dialog-box' is non-nil, and the window system or X | 1294 dialog if `use-dialog-box' is non-nil, and the window system or X |
1295 toolkit in use provides a file dialog box. For graphical file | 1295 toolkit in use provides a file dialog box, and DIR is not a |
1296 dialogs, any the special values of MUSTMATCH; `confirm' and | 1296 remote file. For graphical file dialogs, any the special values |
1297 `confirm-after-completion' are treated as equivalent to nil. | 1297 of MUSTMATCH; `confirm' and `confirm-after-completion' are |
1298 treated as equivalent to nil. | |
1298 | 1299 |
1299 See also `read-file-name-completion-ignore-case' | 1300 See also `read-file-name-completion-ignore-case' |
1300 and `read-file-name-function'." | 1301 and `read-file-name-function'." |
1301 (unless dir (setq dir default-directory)) | 1302 (unless dir (setq dir default-directory)) |
1302 (unless (file-name-absolute-p dir) (setq dir (expand-file-name dir))) | 1303 (unless (file-name-absolute-p dir) (setq dir (expand-file-name dir))) |
1323 (minibuffer-completing-file-name t) | 1324 (minibuffer-completing-file-name t) |
1324 (pred (or predicate 'file-exists-p)) | 1325 (pred (or predicate 'file-exists-p)) |
1325 (add-to-history nil)) | 1326 (add-to-history nil)) |
1326 | 1327 |
1327 (let* ((val | 1328 (let* ((val |
1328 (if (not (next-read-file-uses-dialog-p)) | 1329 (if (or (not (next-read-file-uses-dialog-p)) |
1330 ;; Graphical file dialogs can't handle remote | |
1331 ;; files (Bug#99). | |
1332 (file-remote-p dir)) | |
1329 ;; We used to pass `dir' to `read-file-name-internal' by | 1333 ;; We used to pass `dir' to `read-file-name-internal' by |
1330 ;; abusing the `predicate' argument. It's better to | 1334 ;; abusing the `predicate' argument. It's better to |
1331 ;; just use `default-directory', but in order to avoid | 1335 ;; just use `default-directory', but in order to avoid |
1332 ;; changing `default-directory' in the current buffer, | 1336 ;; changing `default-directory' in the current buffer, |
1333 ;; we don't let-bind it. | 1337 ;; we don't let-bind it. |