Fix #3138: infinite loop when reading package! files
This commit is contained in:
parent
6241ba2faa
commit
de78d0cc62
1 changed files with 11 additions and 11 deletions
|
@ -315,19 +315,19 @@ was installed with."
|
||||||
(let (emacs-lisp-mode) (emacs-lisp-mode))
|
(let (emacs-lisp-mode) (emacs-lisp-mode))
|
||||||
;; Scrape `package!' blocks from FILE for a comprehensive listing of
|
;; Scrape `package!' blocks from FILE for a comprehensive listing of
|
||||||
;; packages used by this module.
|
;; packages used by this module.
|
||||||
(while (search-forward "(package! " nil t)
|
(while (search-forward "(package!" nil t)
|
||||||
(goto-char (match-beginning 0))
|
|
||||||
(let ((ppss (save-excursion (syntax-ppss))))
|
(let ((ppss (save-excursion (syntax-ppss))))
|
||||||
;; Don't collect packages in comments or strings
|
;; Don't collect packages in comments or strings
|
||||||
(or (nth 3 ppss)
|
(unless (or (nth 3 ppss)
|
||||||
(nth 4 ppss)
|
(nth 4 ppss))
|
||||||
(cl-destructuring-bind (_ name . plist)
|
(goto-char (match-beginning 0))
|
||||||
(read (current-buffer))
|
(cl-destructuring-bind (_ name . plist)
|
||||||
(push (cons
|
(read (current-buffer))
|
||||||
name (plist-put
|
(push (cons
|
||||||
plist :modules
|
name (plist-put
|
||||||
(list (doom-module-from-path file))))
|
plist :modules
|
||||||
doom-packages))))))))
|
(list (doom-module-from-path file))))
|
||||||
|
doom-packages))))))))
|
||||||
(error
|
(error
|
||||||
(signal 'doom-package-error
|
(signal 'doom-package-error
|
||||||
(list (doom-module-from-path file)
|
(list (doom-module-from-path file)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue