all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Jim Porter <jporterbugs@gmail.com>
To: Michael Albinus <michael.albinus@gmx.de>, 65023@debbugs.gnu.org
Cc: eliz@gnu.org, Stefan Monnier <monnier@iro.umontreal.ca>
Subject: bug#65023: 29.1.50; Tramp 2.6.1.1 cannot be installed as ELPA package
Date: Fri, 4 Aug 2023 09:40:12 -0700	[thread overview]
Message-ID: <91f76332-aea5-fb3c-2a0b-b2354aee7255@gmail.com> (raw)
In-Reply-To: <877cqdmsvx.fsf@gmx.de>

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

On 8/2/2023 7:16 AM, Michael Albinus wrote:
> With Emacs 29.1, ELPA package Tramp 2.6.1.1 cannot be installed. See the
> *Compile-Log* buffer appended. It looks like the problem is due to
> changes in generation of autoloads.
> 
> Since I'm not familiar with the changes, I don't know how to fix
> this. Note, that the same package installs w/o problems in Emacs 28.

(See also the tramp-devel discussion[1].)

Ok, I figured this out. The new loaddefs code was clobbering a regexp 
internally when doing some additional checks while scanning for autoload 
cookies in external package code. That resulted in some autoloads ending 
up in the wrong file. The fix is just to call 'save-match-data' at the 
right spot.

Eli, is this ok for 29.2? It's a small change, and I think is a fairly 
serious regression from 28.

[1] https://lists.gnu.org/archive/html/tramp-devel/2023-07/msg00009.html

[-- Attachment #2: 0001-Fix-loaddef-generation-with-foo-autoload-cookies-in-.patch --]
[-- Type: text/plain, Size: 1463 bytes --]

From 5252362cd13c381fea07129f99808c50cd03e1ab Mon Sep 17 00:00:00 2001
From: Jim Porter <jporterbugs@gmail.com>
Date: Fri, 4 Aug 2023 09:31:59 -0700
Subject: [PATCH] Fix loaddef generation with ";;;foo-autoload" cookies in
 external packages

This caused an issue where package-specific autoload cookies weren't
being correctly recognized, so they got dumped into the package's main
"<pkg>-autoloads.el" file, instead of "<pkg>-loaddefs.el" as they
should (bug#65023).

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate--parse-file):
Save match data when checking syntax.
---
 lisp/emacs-lisp/loaddefs-gen.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/loaddefs-gen.el b/lisp/emacs-lisp/loaddefs-gen.el
index 5db9af21508..d7b9b131bc8 100644
--- a/lisp/emacs-lisp/loaddefs-gen.el
+++ b/lisp/emacs-lisp/loaddefs-gen.el
@@ -431,7 +431,8 @@ loaddefs-generate--parse-file
                     ;; have an autoload cookie on the first column of a
                     ;; doc string or the like.  (The Emacs tree
                     ;; shouldn't contain any such instances.)
-                    (not (ppss-string-terminator (syntax-ppss))))
+                    (not (ppss-string-terminator
+                          (save-match-data (syntax-ppss)))))
             ;; ... and if we have one of these names, then alter outfile.
             (let* ((aname (match-string 2))
                    (to-file (if aname
-- 
2.25.1


  reply	other threads:[~2023-08-04 16:40 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-02 14:16 bug#65023: 29.1.50; Tramp 2.6.1.1 cannot be installed as ELPA package Michael Albinus
2023-08-04 16:40 ` Jim Porter [this message]
2023-08-04 17:52   ` Eli Zaretskii
2023-08-04 18:20     ` Jim Porter
2023-08-05  9:19       ` Michael Albinus
2023-08-05 20:34         ` Jim Porter
2023-08-06  8:57           ` Michael Albinus
2023-08-07 15:28             ` Michael Albinus
2023-08-08  2:44               ` Jim Porter
2023-08-08  7:03                 ` Michael Albinus
2023-08-15  3:09             ` Stefan Monnier via Bug reports for GNU Emacs, the Swiss army knife of text editors

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

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

  git send-email \
    --in-reply-to=91f76332-aea5-fb3c-2a0b-b2354aee7255@gmail.com \
    --to=jporterbugs@gmail.com \
    --cc=65023@debbugs.gnu.org \
    --cc=eliz@gnu.org \
    --cc=michael.albinus@gmx.de \
    --cc=monnier@iro.umontreal.ca \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.