From 8a12069f7115a0cb959aa178c2776fa9ee09c54c Mon Sep 17 00:00:00 2001 From: Allen Li Date: Wed, 8 Aug 2018 00:03:36 -0700 Subject: [PATCH] Don't include text properties when making autoloads When text properties are included here, they get carried all the way through to autoload--make-defs-autoload, which ends up inserting the form. (if (fboundp 'register-definition-prefixes) (register-definition-prefixes ,file ',(delq nil strings))) This form ends up changing depending on whether or not the file for which we are making autoloads is already open (and thus has text properties): (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "foo" '(#("foo-" 0 4 (fontified nil))))) (if (fboundp 'register-definition-prefixes) (register-definition-prefixes "foo" '("foo-"))) This causes autoload generation (to appear) to be non-deterministic; the contents change based on whether the file under consideration is already open. * lisp/emacs-lisp/autoload.el (autoload-generate-file-autoloads): Ignore text properties when finding autoload defs --- lisp/emacs-lisp/autoload.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el index 92ad6155b5..be075cc2bf 100644 --- a/lisp/emacs-lisp/autoload.el +++ b/lisp/emacs-lisp/autoload.el @@ -765,7 +765,7 @@ autoload-generate-file-autoloads "define-erc-module" "define-erc-response-handler" "defun-rcirc-command")))) - (push (match-string 2) defs)) + (push (match-string-no-properties 2) defs)) (forward-sexp 1) (forward-line 1))))))) -- 2.18.0