Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
2026-05-16 Mats Lidell <matsl@gnu.org>

* hload-path.el (hload-path--make-directory-autoloads-in-sync-subprocess):
Run autoload generation in a synchronous subprocess.
(hyperb:generate-autoloads): Use
hload-path--make-directory-autoloads-in-sync-subprocess.

2026-05-15 Mats Lidell <matsl@gnu.org>

* Add declare-function and defvar that replaces the autoload definitions
Expand Down
19 changes: 17 additions & 2 deletions hload-path.el
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,21 @@ directory separator character.")
"Use `loaddefs-generate' if available or fallback to `make-directory-autoloads'.
`make-directory-autoloads' is defined since Emacs 28.")

(defun hload-path--make-directory-autoloads-in-sync-subprocess (dirs output-file)
"Make autoloads in a synchronous subprocess for directories DIRS.
The autoloads will be written to OUTPUT-FILE. Use `loaddefs-generate'
if available or fallback to `make-directory-autoloads', defined since
Emacs 28."
(call-process (expand-file-name invocation-name invocation-directory)
nil nil nil
"--batch"
"--eval" (format "(%S '%S %S)"
(cond ((fboundp 'loaddefs-generate)
#'loaddefs-generate)
(t
#'make-directory-autoloads))
dirs output-file)))

;; Menu items could call this function before Info is loaded.
(autoload 'Info-goto-node "info" "Jump to specific Info node." t)

Expand All @@ -119,12 +134,12 @@ This is used only when running from git source and not a package release."
(al-buf (find-file-noselect al-file)))
;; (make-local-variable 'generated-autoload-file)
(with-current-buffer al-buf
(hload-path--make-directory-autoloads "." al-file))
(hload-path--make-directory-autoloads-in-sync-subprocess "." al-file))
(kill-buffer al-buf)
(setq al-file (expand-file-name "kotl/kotl-autoloads.el")
al-buf (find-file-noselect al-file))
(with-current-buffer al-buf
(hload-path--make-directory-autoloads "." al-file))
(hload-path--make-directory-autoloads-in-sync-subprocess "." al-file))
(kill-buffer al-buf))
(unless (hyperb:autoloads-exist-p)
(error "Hyperbole failed to generate autoload files; try running 'make src' in a shell in %s" hyperb:dir)))
Expand Down