Subject: Re: bug#52833: native compilation fails on teco.el from MELPA

From: Andrea Corallo <[email-masked]>
Date: Tue, 28 Dec 2021 15:05:15 +0000

Mark Kennedy <[email-masked]> writes:

> from a fresh build:
>
> src/emacs -Q -batch -l comp -f batch-native-compile /home/mtk/.emacs.d/elpa/teco-20200707.2309/teco.el
> Debugger entered--Lisp error: (args-out-of-range "/home/mtk/.emacs.d/elpa/teco-20200707.2309/teco.el" "d" 1)
>   signal(args-out-of-range ("/home/mtk/.emacs.d/elpa/teco-20200707.2309/teco.el" "d" 1))
>   comp--native-compile("/home/mtk/.emacs.d/elpa/teco-20200707.2309/teco.el")
>   batch-native-compile()
>   command-line-1(("-l" "comp" "-f" "batch-native-compile" "/home/mtk/.emacs.d/elpa/teco-20200707.2309/teco.el"))
>   command-line()
>   normal-top-level()

Hi Mark,

having a look here, the trouble is that the compiler is presented with a
function named "teco:type-1-\^M".  The ^M is the trigger for the bug
while converting the lisp function name in a valid symbol name for the C
toolchain.  The fix should cover all characters below 15 that might
appear in a symbol.

I've installed a fix on master as e7699bf290, please have a look if it
works for you as well.

Maintainers will tell us if we want to backport it on emacs-28 as well
(I think would be worth).

Thanks

  Andrea