aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhilip Kaludercic2025-12-14 16:50:49 +0100
committerPhilip Kaludercic2025-12-14 16:54:03 +0100
commit8447ebb06fdf0a282622dd65efb5b6b8a142e896 (patch)
tree665e2d9fc90780e91c720cdb299b8bab320df08b
parent699fb56b4e26aa2cffeec3292bf01c4ac5b11c44 (diff)
downloademacs-8447ebb06fdf0a282622dd65efb5b6b8a142e896.tar.gz
emacs-8447ebb06fdf0a282622dd65efb5b6b8a142e896.zip
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)
-rw-r--r--lisp/startup.el4
1 files changed, 4 insertions, 0 deletions
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."
1236 :type '(choice (repeat (string :tag "Directory name"))) 1236 :type '(choice (repeat (string :tag "Directory name")))
1237 :version "31.1") 1237 :version "31.1")
1238 1238
1239(declare-function byte-recompile-file "bytecomp"
1240 (filename &optional force arg load))
1241
1239(defun prepare-user-lisp (&optional just-activate autoload-file force) 1242(defun prepare-user-lisp (&optional just-activate autoload-file force)
1240 "Byte-compile, scrape autoloads and prepare files in `user-lisp-directory'. 1243 "Byte-compile, scrape autoloads and prepare files in `user-lisp-directory'.
1241Write the autoload file to AUTOLOAD-FILE. If JUST-ACTIVATE is non-nil, 1244Write 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,
1246re-create the entire autoload file and byte-compile everything 1249re-create the entire autoload file and byte-compile everything
1247unconditionally." 1250unconditionally."
1248 (interactive (list nil nil current-prefix-arg)) 1251 (interactive (list nil nil current-prefix-arg))
1252 (unless just-activate (require 'bytecomp))
1249 (unless (file-directory-p user-lisp-directory) 1253 (unless (file-directory-p user-lisp-directory)
1250 (error "No such directory: %S" user-lisp-directory)) 1254 (error "No such directory: %S" user-lisp-directory))
1251 (unless autoload-file 1255 (unless autoload-file