From b2f32e4c9a06234019f07f448b53b76e62aebbba Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Wed, 19 Oct 2016 10:42:45 +0300 Subject: [PATCH] Don't scan compiled module files for autoloads * lisp/emacs-lisp/autoload.el (update-directory-autoloads): Ignore compiled module files. Make sure the extension really ends the file name. --- lisp/emacs-lisp/autoload.el | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index eb6b746bd80..d4b9479b752 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -766,7 +766,13 @@ write its autoloads into the specified file instead." (interactive "DUpdate autoloads from directory: ") (let* ((files-re (let ((tmp nil)) (dolist (suf (get-load-suffixes)) - (unless (string-match "\\.elc" suf) (push suf tmp))) + ;; We don't use module-file-suffix below because + ;; we don't want to depend on whether Emacs was + ;; built with or without modules support, nor + ;; what is the suffix for the underlying OS. + (unless (string-match "\\.\\(elc\\|\\so\\|dll\\)\\'" + suf) + (push suf tmp))) (concat "^[^=.].*" (regexp-opt tmp t) "\\'"))) (files (apply 'nconc (mapcar (lambda (dir) -- 2.39.2