From dabd1cb2ffe3aed39f11d89f5ab1acab5b1d0426 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 25 Jun 2016 15:57:39 -0400 Subject: [PATCH v1] 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 e721b55..f669c31 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1081,6 +1081,8 @@ package-dir-info (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.8.0