diff options
author | Po Lu <luangruo@yahoo.com> | 2021-12-05 11:30:14 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2021-12-05 11:30:14 +0800 |
commit | 1710fca446650b25c9656f2a6131785581afa22e (patch) | |
tree | ca3cb96966868d4ff7d283530613d1ea78d15c78 /lisp/emacs-lisp | |
parent | 360d2d3a3328799ed8fea27bc7c13873f84b65fa (diff) | |
parent | 8bdea767208257599f6ab727e51dd94f0c1872e1 (diff) | |
download | emacs-1710fca446650b25c9656f2a6131785581afa22e.tar.gz emacs-1710fca446650b25c9656f2a6131785581afa22e.tar.bz2 emacs-1710fca446650b25c9656f2a6131785581afa22e.zip |
Merge remote-tracking branch 'origin/master' into feature/pgtk
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/package.el | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index 08dfe504d27..66bbd631a72 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -1181,13 +1181,17 @@ The return result is a `package-desc'." info) (while files (with-temp-buffer - (insert-file-contents (pop files)) - ;; When we find the file with the data, - (when (setq info (ignore-errors (package-buffer-info))) - ;; stop looping, - (setq files nil) - ;; set the 'dir kind, - (setf (package-desc-kind info) 'dir)))) + (let ((file (pop files))) + ;; The file may be a link to a nonexistent file; e.g., a + ;; lock file. + (when (file-exists-p file) + (insert-file-contents file) + ;; When we find the file with the data, + (when (setq info (ignore-errors (package-buffer-info))) + ;; stop looping, + (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. |