diff options
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/complete.el | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 9e028970a00..a8d70ba5619 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-08-02 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * complete.el (PC-expand-many-files): Avoid signalling an error when | ||
| 4 | the current directory doesn't exist. Reported by Micha,Ak(Bl Cadilhac. | ||
| 5 | |||
| 1 | 2006-08-02 Andreas Schwab <schwab@suse.de> | 6 | 2006-08-02 Andreas Schwab <schwab@suse.de> |
| 2 | 7 | ||
| 3 | * bindings.el (mode-line-format): Simplify reference to vc-mode. | 8 | * bindings.el (mode-line-format): Simplify reference to vc-mode. |
diff --git a/lisp/complete.el b/lisp/complete.el index ca6231893c3..c49ad488536 100644 --- a/lisp/complete.el +++ b/lisp/complete.el | |||
| @@ -811,6 +811,12 @@ or properties are considered." | |||
| 811 | (defun PC-expand-many-files (name) | 811 | (defun PC-expand-many-files (name) |
| 812 | (with-current-buffer (generate-new-buffer " *Glob Output*") | 812 | (with-current-buffer (generate-new-buffer " *Glob Output*") |
| 813 | (erase-buffer) | 813 | (erase-buffer) |
| 814 | (when (and (file-name-absolute-p name) | ||
| 815 | (not (file-directory-p default-directory))) | ||
| 816 | ;; If the current working directory doesn't exist `shell-command' | ||
| 817 | ;; signals an error. So if the file names we're looking for don't | ||
| 818 | ;; depend on the working directory, switch to a valid directory first. | ||
| 819 | (setq default-directory "/")) | ||
| 814 | (shell-command (concat "echo " name) t) | 820 | (shell-command (concat "echo " name) t) |
| 815 | (goto-char (point-min)) | 821 | (goto-char (point-min)) |
| 816 | ;; CSH-style shells were known to output "No match", whereas | 822 | ;; CSH-style shells were known to output "No match", whereas |