[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#50285: 28.0.50; Mew dosen't work correctly if .el files of Mew are n
From: |
Stefan Monnier |
Subject: |
bug#50285: 28.0.50; Mew dosen't work correctly if .el files of Mew are native compiled |
Date: |
Mon, 30 Aug 2021 17:02:08 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
> Following error message is displayed in the echo area.
> "error in process sentinel: Invalid function: mew-filter"
This error message indicates that a call to `mew-filter` was compiled as
a function call, while `mew-filter` is a macro. This happens when
`mew-filter` is not defined at the time the call is compiled by
`bytecomp.el`.
When this problem shows up in a `.elc` file it means the `.elc` file was
miscompiled and the fault is usually attributed to the source code's
failure to make sure the macro was defined (e.g. by using (require 'mew-func)
somewhere earlier in the file).
In the present case, IIUC the `.elc` file itself is correct because
Mew's makefile compensates for the lack of (require 'mew-func) by using
an ad-hoc compilation script that makes sure the right files
(e.g. `mew-func`) are loaded as needed before the compilation of the
relevant code.
But the `.eln` file is not because when generating the `.eln` our code
starts again from the `.el` file and passes it again to `bytecomp.el`
but this time it's done outside of the control of the makefile, and it
so happens that `mew-func.el` was not loaded before compiling (again)
that call to `mew-filter`.
So we really have 3 problems here:
1- The code in Mew should not rely on the makefile rule for
correct compilation.
Fixing this would also make it easier to distribute Mew via ELPA
(where a similar problem shows up since package.el will compile the
.el files in an unspecified order which could thus result in the
same kind of miscompilation).
2- The generation of the `.eln` file should start from the `.elc` file
rather than from the `.el` file because we sometimes lack the
information needed to correctly re-generate the `.elc` file from the
`.el` file.
-- Stefan