[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#59793: 29.0.60; subr.elc is not compiled correctly
From: |
Stefan Kangas |
Subject: |
bug#59793: 29.0.60; subr.elc is not compiled correctly |
Date: |
Sun, 10 Sep 2023 12:26:00 -0700 |
tags 59793 + notabug
close 59793
thanks
Eli Zaretskii <eliz@gnu.org> writes:
>> From: miha@kamnitnik.top
>> Cc: tumashu@163.com, 59793@debbugs.gnu.org
>> Date: Sun, 04 Dec 2022 18:27:07 +0100
>>
>> In Emacs 29.0.50, I checked M-x disassemble RET insert-for-yank-1 RET
>> and it looks like it uses an 'insert' bytcode operation instead of
>> funcalling the 'insert' function. I think this is what prevents
>> overriding of 'insert' from working on byte-compiled code, as explained
>> in '(elisp) Advice and Byte Code'.
>
> Of course! And the same can happen with other function calls that the byte
> compiler converts into bytecode operations.
>
> That is why this technique is unreliable and shouldn't be used.
This bug report was about redefining built-in functions that have
opcodes and then wondering why the bytecode behavior differs from the
interpreted.
The answer is: don't do that, use add-advice instead.
So I'm closing this bug report.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- bug#59793: 29.0.60; subr.elc is not compiled correctly,
Stefan Kangas <=