(config-apel-package): Avoid an error concerning PACKAGEDIR with old XEmacs
[elisp/apel.git] / APEL-MK
diff --git a/APEL-MK b/APEL-MK
index 017362b..7641808 100644 (file)
--- a/APEL-MK
+++ b/APEL-MK
                                  (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)))
   (if PACKAGEDIR