Skip to content

Commit 0d26f30

Browse files
committed
tweak(builtin): cache the downloaded loaddefs-gen.el file
1 parent b7e0739 commit 0d26f30

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

core/me-builtin.el

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -231,13 +231,13 @@ or file path may exist now."
231231
;; Due to a bug in Emacs 29.1, you must apply the following change prior
232232
;; installation or upgrading TRAMP 2.7.0 from GNU ELPA:
233233
;; gnu.org/software/tramp/#ELPA-Installation
234-
(when (version= emacs-version "29.1")
235-
(with-current-buffer
236-
(url-retrieve-synchronously
237-
"https://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/emacs-lisp/loaddefs-gen.el?h=emacs-29")
238-
(goto-char (point-min))
239-
(while (looking-at "^.+$") (forward-line))
240-
(eval-region (point) (point-max))))
234+
(when-let ((_ (version= emacs-version "29.1"))
235+
(dir (+package-download-from-urls
236+
'emacs-29.1-loaddefs-gen-fix
237+
"https://git.savannah.gnu.org/cgit/emacs.git/plain/lisp/emacs-lisp/loaddefs-gen.el?h=emacs-29")))
238+
(with-temp-buffer
239+
(insert-file-contents (expand-file-name "loaddefs-gen.el" dir))
240+
(eval-region (point-min) (point-max))))
241241

242242
(use-package tramp
243243
:straight t

0 commit comments

Comments
 (0)