emacs-pretest-bug
[Top][All Lists]
Advanced

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

completion-setup-function shouldn't set default-directory to nil


From: Drew Adams
Subject: completion-setup-function shouldn't set default-directory to nil
Date: Fri, 2 Mar 2007 12:31:04 -0800

I ran into some problems, but I'm not sure if this is the cause, and I
can't give a recipe to reproduce the problems.

I wonder whether this code at the beginning of
`completion-setup-function':

(if minibuffer-completing-file-name
    (with-current-buffer mainbuf
      (setq default-directory (file-name-directory mbuf-contents))))

shouldn't perhaps be more like this, to avoid setting
default-directory to nil:

(when (and minibuffer-completing-file-name
           (file-name-directory mbuf-contents))
  (with-current-buffer mainbuf
     (setq default-directory (file-name-directory mbuf-contents))))


In GNU Emacs 22.0.93.1 (i386-mingw-nt5.1.2600)
 of 2007-01-25 on LENNART-69DE564
X server distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/g/include'





reply via email to

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