From 14a86f837762af8d16eef57c315da93b56699901 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 25 Jun 2016 15:57:39 -0400 Subject: [PATCH] Improve error when installing non-package dirs * lisp/emacs-lisp/package.el (package-dir-info): Throw meaningful error when no file with package info is found (Bug #19851). --- lisp/emacs-lisp/package.el | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index e721b553eae..f669c31e791 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1081,6 +1081,8 @@ The return result is a `package-desc'." (setq files nil) ;; set the 'dir kind, (setf (package-desc-kind info) 'dir)))) + (unless info + (error "No .el files with package headers in `%s'" default-directory)) ;; and return the info. info)))) -- 2.39.2