From 8447ebb06fdf0a282622dd65efb5b6b8a142e896 Mon Sep 17 00:00:00 2001 From: Philip Kaludercic Date: Sun, 14 Dec 2025 16:50:49 +0100 Subject: [PATCH] Load 'byte-recompile-file' to process User Lisp directory * lisp/startup.el (byte-recompile-file): Declare 'byte-recompile-file'. (prepare-user-lisp): Load bytecomp if necessary. (Bug#79997) --- lisp/startup.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/startup.el b/lisp/startup.el index c455eb73814..7804ab42c8c 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1236,6 +1236,9 @@ directories that do not contain Lisp files." :type '(choice (repeat (string :tag "Directory name"))) :version "31.1") +(declare-function byte-recompile-file "bytecomp" + (filename &optional force arg load)) + (defun prepare-user-lisp (&optional just-activate autoload-file force) "Byte-compile, scrape autoloads and prepare files in `user-lisp-directory'. Write the autoload file to AUTOLOAD-FILE. If JUST-ACTIVATE is non-nil, @@ -1246,6 +1249,7 @@ If FORCE is non-nil, or if invoked interactively with a prefix argument, re-create the entire autoload file and byte-compile everything unconditionally." (interactive (list nil nil current-prefix-arg)) + (unless just-activate (require 'bytecomp)) (unless (file-directory-p user-lisp-directory) (error "No such directory: %S" user-lisp-directory)) (unless autoload-file