forked from mirrors/org-mode
mk/org-fixup.el: Adjust for Emacs 29 autoload.el deprecation
* mk/org-fixup.el (org-make-org-loaddefs): Generate org-loaddefs.el with loaddefs-generate if available. Link: https://list.orgmode.org/87lenabrcv.fsf@kyleam.com
This commit is contained in:
parent
6d9f3af774
commit
fa058f6d97
|
@ -24,7 +24,6 @@
|
|||
;;
|
||||
;;; Commentary:
|
||||
|
||||
(require 'autoload)
|
||||
(require 'org-compat "org-compat.el")
|
||||
|
||||
(defun org-make-manual ()
|
||||
|
@ -86,18 +85,22 @@ This function is internally used by the build system and should
|
|||
be used by foreign build systems or installers to produce this
|
||||
file in the installation directory of Org mode. Org will not
|
||||
work correctly if this file is not up-to-date."
|
||||
(with-temp-buffer
|
||||
(set-visited-file-name "org-loaddefs.el")
|
||||
(insert ";;; org-loaddefs.el --- autogenerated file, do not edit\n;;\n;;; Code:\n")
|
||||
(let ((files (directory-files default-directory
|
||||
nil "^\\(org\\|ob\\|ox\\|ol\\|oc\\)\\(-.*\\)?\\.el$")))
|
||||
(mapc (lambda (f) (generate-file-autoloads f)) files))
|
||||
(insert "\f\n(provide 'org-loaddefs)\n")
|
||||
(insert "\f\n;; Local Variables:\n;; version-control: never\n")
|
||||
(insert ";; no-byte-compile: t\n;; no-update-autoloads: t\n")
|
||||
(insert ";; coding: utf-8\n;; End:\n;;; org-loaddefs.el ends here\n")
|
||||
(let ((inhibit-read-only t))
|
||||
(save-buffer))))
|
||||
(let ((outfile "org-loaddefs.el"))
|
||||
(if (fboundp 'loaddefs-generate) ; FIXME: Emacs >= 29
|
||||
(loaddefs-generate default-directory (expand-file-name outfile))
|
||||
(require 'autoload)
|
||||
(with-temp-buffer
|
||||
(set-visited-file-name outfile)
|
||||
(insert ";;; org-loaddefs.el --- autogenerated file, do not edit\n;;\n;;; Code:\n")
|
||||
(let ((files (directory-files default-directory
|
||||
nil "^\\(org\\|ob\\|ox\\|ol\\|oc\\)\\(-.*\\)?\\.el$")))
|
||||
(mapc (lambda (f) (generate-file-autoloads f)) files))
|
||||
(insert "\f\n(provide 'org-loaddefs)\n")
|
||||
(insert "\f\n;; Local Variables:\n;; version-control: never\n")
|
||||
(insert ";; no-byte-compile: t\n;; no-update-autoloads: t\n")
|
||||
(insert ";; coding: utf-8\n;; End:\n;;; org-loaddefs.el ends here\n")
|
||||
(let ((inhibit-read-only t))
|
||||
(save-buffer))))))
|
||||
|
||||
(defun org-make-autoloads (&optional compile force)
|
||||
"Make the files org-loaddefs.el and org-version.el in the install directory.
|
||||
|
|
Loading…
Reference in New Issue