bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#55414: 29.0.50; Byte compilation error for the modus-themes


From: Alan Mackenzie
Subject: bug#55414: 29.0.50; Byte compilation error for the modus-themes
Date: Sun, 29 May 2022 13:38:00 +0000

Hello, Mattias.

On Sun, May 29, 2022 at 11:18:51 +0200, Mattias Engdegård wrote:
> 27 maj 2022 kl. 20.24 skrev Alan Mackenzie <acm@muc.de>:

> > Records are typically not read as such by the
> > reader.  They are created by macro expansion from cl-defstruct or the
> > like.

> While that could happen, it doesn't change the fact that once built,
> that record literal is an opaque piece of data inside which no further
> diagnostics will be reported. (Much like vectors for that matter.)

You're telling me (I didn't know already) that, e.g., lambda forms inside
vectors do not normally get byte compiled.  This might be regarded as a
bug.

However, consider the following:

(defvar asdf nil)
(defun foo ()
  "doc string"
  (eval-when-compile
    (let ((baz  [ (lambda () (message "bar")) ] ))
      (aset baz 0
            (byte-compile (aref baz 0)))
      (setq asdf baz))))

..  It will be seen that the element of the vector baz gets compiled, and
the vector gets written to the global variable asdf.

Admittedly, the position information is currently stripped from the
object before the byte-compile is evaluated, but there is no reason this
will necessarily always be the case.

> However there is no appreciable cost to traverse records as well so
> that has now been changed.

Thanks!

-- 
Alan Mackenzie (Nuremberg, Germany).





reply via email to

[Prev in Thread] Current Thread [Next in Thread]