Hi Keita, Ikumi Keita <ik...@ikumi.que.jp> writes:
> On second thought, I came to think that we should retain compatibility > for Emacs<29. Otherwise it would be difficult to check whether the > future ELPA release has the compatibility or not. Yes, I agree. > So how about one like this? > (let* ((autoload-file (expand-file-name "$@")) \ > (autoload-file-dir (file-name-directory autoload-file)) \ > (addition-text "(add-to-list (quote load-path)\n\ > (directory-file-name\n\ > (file-name-directory > load-file-name)))" > )) \ > (if (fboundp `loaddefs-generate) \ > (loaddefs-generate autoload-file-dir autoload-file \ > (list "tex-wizard.el") \ > addition-text)\ > (mapc (lambda (file) \ > (update-file-autoloads file nil autoload-file)) \ > command-line-args-left) \ > (write-region addition-text nil autoload-file t)) \ > (save-buffers-kill-emacs t))' 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): --8<---------------cut here---------------start------------->8--- (let* ((autoload-file (expand-file-name "$@")) (autoload-file-dir (file-name-directory autoload-file)) (addition-text "(add-to-list (quote load-path)\n\ (directory-file-name\n\ (file-name-directory load-file-name)))")) (if (fboundp `loaddefs-generate) (loaddefs-generate autoload-file-dir autoload-file (list "tex-wizard.el") addition-text) (mapc (lambda (file) (update-file-autoloads file nil autoload-file)) command-line-args-left) (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-text))) (save-buffers-kill-emacs t)) --8<---------------cut here---------------end--------------->8--- WDYT? > (I haven't tested it yet.) Me either. > Additionally, we can include auctex.el and lpath.el in the excluded > file list. Yes, makes sense. Best, Arash