From 97da8eeb7c739ca549c9769996fc6da326d587fc Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 15 Aug 2022 07:29:22 +0200 Subject: [PATCH] Make update-directory-autoloads available by default again * lisp/subr.el (make-directory-autoloads) (update-directory-autoloads): Make available by default again (bug#57200). * lisp/obsolete/autoload.el (make-directory-autoloads): Add obsoletion form. (batch-update-autoloads): Fix warning. --- lisp/obsolete/autoload.el | 8 +++++++- lisp/subr.el | 7 +++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lisp/obsolete/autoload.el b/lisp/obsolete/autoload.el index a56f31629e5..a30f8271a3b 100644 --- a/lisp/obsolete/autoload.el +++ b/lisp/obsolete/autoload.el @@ -31,6 +31,10 @@ ;; The functions in this file have been superseded by loaddefs-gen.el. +;; Note: When removing this file, also remove the references to +;; `make-directory-autoloads' and `update-directory-autoloads' in +;; subr.el. + ;;; Code: (require 'lisp-mode) ;for `doc-string-elt' properties. @@ -729,6 +733,7 @@ its autoloads into the specified file instead. The function does NOT recursively descend into subdirectories of the directory or directories specified." + (declare (obsolete loaddefs-generate "29.1")) (interactive "DUpdate autoloads from directory: \nFWrite to file: ") (let* ((files-re (let ((tmp nil)) (dolist (suf (get-load-suffixes)) @@ -902,7 +907,8 @@ should be non-nil)." (let ((args command-line-args-left)) (batch-update-autoloads--summary args) (setq command-line-args-left nil) - (make-directory-autoloads args generated-autoload-file))) + (with-suppressed-warnings ((obsolete make-directory-autoloads)) + (make-directory-autoloads args generated-autoload-file)))) (provide 'autoload) diff --git a/lisp/subr.el b/lisp/subr.el index 42ce9148a90..cd6a9be099c 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1918,6 +1918,13 @@ be a list of the form returned by `event-start' and `event-end'." (define-obsolete-function-alias 'user-original-login-name #'user-login-name "28.1") +;; These are in obsolete/autoload.el, but are commonly used by +;; third-party scripts that assume that they exist without requiring +;; autoload. These should be removed when obsolete/autoload.el is +;; removed. +(autoload 'make-directory-autoloads "autoload" nil t) +(autoload 'update-directory-autoloads "autoload" nil t) + ;;;; Hook manipulation functions. -- 2.39.2