Hi Arash, >>>>> Arash Esbati <ar...@gnu.org> writes: > Do you have an older Emacs available? Depending on the output of > `update-file-autoloads', we could probably prettify the genereated file > with somethin like this (I removed the EOL-masks for easier editing):
I have to add "(save-some-buffers t)" before `with-temp-file'. The arragned result is: AUTOLOAD=--eval '\ (let* ((autoload-file (expand-file-name "$@")) \ (autoload-file-dir (file-name-directory autoload-file)) \ (addition-code "(add-to-list (quote load-path)\n\ (directory-file-name\n\ (file-name-directory load-file-name)))")) \ (if (fboundp (quote loaddefs-generate)) \ (loaddefs-generate autoload-file-dir autoload-file \ (list "tex-wizard.el" "auctex.el" "lpath.el") \ addition-code) \ (setq generated-autoload-file autoload-file) \ (update-directory-autoloads autoload-file-dir) \ (save-some-buffers t) \ (with-temp-file autoload-file \ (insert-file-contents autoload-file) \ (cond ((progn (goto-char (point-min)) \ (re-search-forward "^;;; Code:" nil t)) \ (newline 2)) \ ((progn (goto-char (point-min)) \ (re-search-forward "^$$")) \ (open-line 2)) \ (t (goto-char (point-max)))) \ (insert addition-code))) \ (save-buffers-kill-emacs t))' auctex-autoloads.el: rm -f $@ $(EMACS) $(AUTOLOAD) I made use of `update-directory-autoloads'. Emacs 27.1 does have it while it doesn't `make-directory-autoloads', so we can dispense of mapc+update-file-autoloads and $(wildcard *.el) in the make rule. Emacs 27.1, 28.2 and 29.4 works with the above settings. :-) Regards, Ikumi Keita #StandWithUkraine #StopWarInUkraine #Gaza #StopMassiveKilling #CeasefireNOW