emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/complete.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/complete.el,v
Date: Wed, 02 Aug 2006 14:08:50 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        06/08/02 14:08:49

Index: complete.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/complete.el,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- complete.el 28 Jun 2006 14:16:20 -0000      1.55
+++ complete.el 2 Aug 2006 14:08:48 -0000       1.56
@@ -811,6 +811,12 @@
 (defun PC-expand-many-files (name)
   (with-current-buffer (generate-new-buffer " *Glob Output*")
     (erase-buffer)
+    (when (and (file-name-absolute-p name)
+               (not (file-directory-p default-directory)))
+      ;; If the current working directory doesn't exist `shell-command'
+      ;; signals an error.  So if the file names we're looking for don't
+      ;; depend on the working directory, switch to a valid directory first.
+      (setq default-directory "/"))
     (shell-command (concat "echo " name) t)
     (goto-char (point-min))
     ;; CSH-style shells were known to output "No match", whereas




reply via email to

[Prev in Thread] Current Thread [Next in Thread]