diff --git a/lisp/_prepare.el b/lisp/_prepare.el index fd42c867..14bd990d 100644 --- a/lisp/_prepare.el +++ b/lisp/_prepare.el @@ -832,18 +832,23 @@ This uses function `locate-dominating-file' to look up directory tree." (defun eask--try-construct-package-desc (file) "Try construct the package descriptor from FILE." - (with-temp-buffer - (insert-file-contents file) - (setq eask-package-desc (ignore-errors - (if (string-suffix-p "-pkg.el" file) - (package--read-pkg-desc 'dir) - (unless (eask-pkg-el) - (package-buffer-info)))))) - (eask-msg (concat - (if eask-package-desc "✓ " "✗ ") - "Try constructing the package-descriptor (%s)... " - (if eask-package-desc "succeeded! " "failed!")) - (file-name-nondirectory file))) + (let (skipped) + (with-temp-buffer + (insert-file-contents file) + (setq eask-package-desc + (ignore-errors + (cond ((string-suffix-p "-pkg.el" file) ; if ensure -pkg.el + (package--read-pkg-desc 'dir)) + ((eask-pkg-el) ; if -pkg.el is presented, + (setq skipped t) nil) ; skip it + (t (package-buffer-info)))))) ; default read main package file + (eask-msg (concat + (if eask-package-desc "✓ " "✗ ") + "Try constructing the package-descriptor (%s)... " + (cond (eask-package-desc "succeeded!") + (skipped "skipped!") + (t "failed!"))) + (file-name-nondirectory file)))) (defun eask-f-package-file (file) "Set package FILE." @@ -857,7 +862,7 @@ This uses function `locate-dominating-file' to look up directory tree." (((and (not eask-package-descriptor) ; prevent multiple definition error (not eask-package-desc))) ; check if constructed (pkg-file (eask-pkg-el))) - (eask-f-package-descriptor pkg-file) + ;;(eask-f-package-descriptor pkg-file) ;; XXX: Make sure DSL package descriptor is set back to `nil' (setq eask-package-descriptor nil))))