GNU bug report logs - #44660
[feature/native-comp] defalias to macro in compiled elisp seems to not work in smartparens

Previous Next

Package: emacs;

Reported by: Jim Myhrberg <contact <at> jimeh.me>

Date: Sun, 15 Nov 2020 18:16:02 UTC

Severity: normal

Done: Andrea Corallo <akrl <at> sdf.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Andrea Corallo <akrl <at> sdf.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#44660: closed ([feature/native-comp] defalias to macro in
 compiled elisp seems to not work in smartparens)
Date: Mon, 16 Nov 2020 14:39:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Mon, 16 Nov 2020 14:38:15 +0000
with message-id <xjfv9e5fju0.fsf <at> sdf.org>
and subject line Re: bug#44660: [feature/native-comp] defalias to macro in compiled elisp seems to not work in smartparens
has caused the debbugs.gnu.org bug report #44660,
regarding [feature/native-comp] defalias to macro in compiled elisp seems to not work in smartparens
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
44660: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=44660
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Jim Myhrberg <contact <at> jimeh.me>
To: bug-gnu-emacs <at> gnu.org
Subject: [feature/native-comp] defalias to macro in compiled elisp seems to
 not work in smartparens
Date: Sun, 15 Nov 2020 18:14:48 +0000
Hi,

After the following pull request was merged:
https://github.com/Fuco1/smartparens/pull/958

I started getting this error:

    Error running timer ‘sp-show--pair-function’: (invalid-function
sp--while-no-input)

The offending code seems to be:

    (defalias 'sp--while-no-input 'while-no-input)

And then later the call to "sp--while-no-input" within the
"sp-show--pair-function" function. If I manually eval the
"sp-show--pair-function" so it's no longer a natively compiled
function, things start working again.

For now in my personal config (which is not native-compiled), I've
resorted to this work-around which seems to work:

    (defun sp--while-no-input (&rest body)
      (eval (append '(while-no-input) body)))

Thanks again :)


[Message part 3 (message/rfc822, inline)]
From: Andrea Corallo <akrl <at> sdf.org>
To: Jim Myhrberg <contact <at> jimeh.me>
Cc: 44660-done <at> debbugs.gnu.org
Subject: Re: bug#44660: [feature/native-comp] defalias to macro in compiled
 elisp seems to not work in smartparens
Date: Mon, 16 Nov 2020 14:38:15 +0000
Jim Myhrberg <contact <at> jimeh.me> writes:

> Hi Andrea,
>
> Yep, it does indeed fix it. I assume it's related to byte compilation
> then, and not native-comp? Thanks for your quick response, and I'm
> sorry for wasting your time with this :(

Hi Jim,

yes this "front-end" related.

To have top level forms taking effect in the compile time those has to
be enclosed into `eval-when-compile' or `cl-eval-when'.

You should be able to see the same issue from command line using like
`batch-byte-compile-file'.

I'm closing this, thanks for reporting!

  Andrea


This bug report was last modified 4 years and 183 days ago.

Previous Next


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