From: Lars Ingebrigtsen Date: Wed, 15 Jun 2022 12:05:07 +0000 (+0200) Subject: Fix ;;;###autoload scanning from (some) packages X-Git-Tag: emacs-29.0.90~1447^2~1741 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=0d383b592c2fd1d9b73ebd611d05d80089c7a3a6;p=emacs.git Fix ;;;###autoload scanning from (some) packages * lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file): Fix autoloads scanning from packages. --- diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el index 95666ddb2a0..86c776e3013 100644 --- a/lisp/emacs-lisp/loaddefs-gen.el +++ b/lisp/emacs-lisp/loaddefs-gen.el @@ -366,7 +366,11 @@ don't include." ;; We always return the package version (even for pre-dumped ;; files). - (when package-data + (if (not package-data) + ;; We have to switch `emacs-lisp-mode' when scanning + ;; loaddefs for packages so that `syntax-ppss' later gives + ;; correct results. + (emacs-lisp-mode) (let ((version (lm-header "version")) package) (when (and version