GNU bug report logs - #53024
29.0.50; Wishlist: Byte-compile loaddefs.el?

Previous Next

Package: emacs;

Reported by: Lars Ingebrigtsen <larsi <at> gnus.org>

Date: Wed, 5 Jan 2022 15:54:01 UTC

Severity: wishlist

Found in version 29.0.50

Fixed in version 29.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: 53024 <at> debbugs.gnu.org
Cc: monnier <at> iro.umontreal.ca
Subject: bug#53024: 29.0.50; Wishlist: Byte-compile loaddefs.el?
Date: Sat, 22 Jan 2022 13:27:08 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> Parts of 59732a83c8 (removing DOC file scanning for .el files) were
> reverted because of loaddefs.el handling (see bug#52969).  Stefan M
> suggested the possibility of re-reverting that, but that would mean that
> loaddefs.el would have to be byte-compiled, and it's unclear whether
> that would lead to problems or not.

Hm...  the commment in autoload.el is:

            ";; no-byte-compile: t\n" ;; #$ is byte-compiled into nil.

commit 1f7b602f843d82d2da46528c6cc2a16c794ca668
Author:     Noam Postavsky <npostavs <at> gmail.com>
AuthorDate: Fri Jul 5 22:26:13 2019 -0400

    Add commentary about #$ in autoload files
    
    * lisp/emacs-lisp/autoload.el (autoload-rubric): Add commentary about
    `#$' trick.

Oh, it refers to this:

+                ;; Use the `#$' to indicate current file, from which
+                ;; we extract the directory name.  Note that
+                ;; `package-quickstart-refresh' specifically replaces
+                ;; `#$', so any other tricks (e.g., `load-file-name')
+                ;; will not work for that case.
 		"(add-to-list 'load-path (directory-file-name
                          (or (file-name-directory #$) (car load-path))))\n\n")

Hm.  Anyway, when if I remove the no-byte-compile, then the build does
indeed break:

In toplevel form:
net/tramp-rclone.el:38:2: Error: Symbol’s value as variable is void: tramp-methods
make[3]: *** [Makefile:327: net/tramp-rclone.elc] Error 1
make[3]: *** Waiting for unfinished jobs....

In toplevel form:
net/tramp-sh.el:35:2: Error: Symbol’s value as variable is void: tramp-methods
make[3]: *** [Makefile:327: net/tramp-sh.elc] Error 1

In toplevel form:
net/tramp-smb.el:31:2: Error: Symbol’s value as variable is void: tramp-methods
make[3]: *** [Makefile:327: net/tramp-smb.elc] Error 1

In toplevel form:
net/tramp-sshfs.el:36:2: Error: Symbol’s value as variable is void: tramp-methods
make[3]: *** [Makefile:327: net/tramp-sshfs.elc] Error 1

In toplevel form:
net/tramp-sudoedit.el:37:2: Error: Symbol’s value as variable is void: tramp-methods

This is the simple patch I applied to test.

diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index d0bf342b84..58df936dd9 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -408,7 +408,6 @@ autoload-rubric
 			  (file-name-sans-extension basename))))
 	    ";; Local Variables:\n"
 	    ";; version-control: never\n"
-            ";; no-byte-compile: t\n" ;; #$ is byte-compiled into nil.
 	    ";; no-update-autoloads: t\n"
 	    ";; coding: utf-8-emacs-unix\n"
 	    ";; End:\n"

I haven't tried debugging further, but it looks like it'll take some
work to get this er working.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no




This bug report was last modified 2 years and 285 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.