(PACKAGEDIR): Avoid an error with Emacs.
[elisp/semi.git] / SEMI-CFG
index 1c91805..f09e497 100644 (file)
--- a/SEMI-CFG
+++ b/SEMI-CFG
                        (listp configure-package-path))
                   (delete "" configure-package-path))))
        dir)
-    (while (not (file-exists-p (setq dir (car dirs))))
+    (while (and (setq dir (car dirs))
+               (not (file-exists-p dir)))
       (setq dirs (cdr dirs)))
     dir))