aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-08-02 14:08:49 +0000
committerStefan Monnier2006-08-02 14:08:49 +0000
commit424f4c9cfaf7c44e1e4ed1cc21d0d13f7dd59331 (patch)
treed9a96178435e906c4ffadc2abe5cfb1be5d59b23
parent3862ba195c151ebc6930dbd3b4a9ed3a38e53a48 (diff)
downloademacs-424f4c9cfaf7c44e1e4ed1cc21d0d13f7dd59331.tar.gz
emacs-424f4c9cfaf7c44e1e4ed1cc21d0d13f7dd59331.zip
(PC-expand-many-files): Avoid signalling an error when
the current directory doesn't exist. Reported by Michaƫl Cadilhac.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/complete.el6
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 @@
12006-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
12006-08-02 Andreas Schwab <schwab@suse.de> 62006-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