unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Allen Li <darkfeline@felesatra.moe>
To: 32395@debbugs.gnu.org
Subject: bug#32395: [PATCH] Don't include text properties when making autoloads
Date: Wed, 8 Aug 2018 00:13:04 -0700	[thread overview]
Message-ID: <CADbSrJxNx20p3vU24LmZGDGSZKXdXY3PFzi3fe7shtmPFRTMJQ@mail.gmail.com> (raw)
In-Reply-To: <CADbSrJza9wZ8prPmD005-RvnwTry-Oq9LRYVTDCcOE4srxL1qA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 27 bytes --]

Attached patch fixing this

[-- Attachment #2: 0001-Don-t-include-text-properties-when-making-autoloads.patch --]
[-- Type: text/x-patch, Size: 1912 bytes --]

From 8a12069f7115a0cb959aa178c2776fa9ee09c54c Mon Sep 17 00:00:00 2001
From: Allen Li <darkfeline@felesatra.moe>
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


  reply	other threads:[~2018-08-08  7:13 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08  7:09 bug#32395: 26.1; generated autoloads includes string properties if buffer is open Allen Li
2018-08-08  7:13 ` Allen Li [this message]
2018-08-11  9:18 ` Eli Zaretskii
2018-08-11  9:49   ` Allen Li
2018-08-17 14:10     ` Eli Zaretskii

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CADbSrJxNx20p3vU24LmZGDGSZKXdXY3PFzi3fe7shtmPFRTMJQ@mail.gmail.com \
    --to=darkfeline@felesatra.moe \
    --cc=32395@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).