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

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

bug#59793: 29.0.60; subr.elc is not compiled correctly


From: Akib Azmain Turja
Subject: bug#59793: 29.0.60; subr.elc is not compiled correctly
Date: Sat, 03 Dec 2022 23:48:50 +0600

Eli Zaretskii <eliz@gnu.org> writes:

> On December 3, 2022 5:10:52 PM GMT+02:00, Akib Azmain Turja 
> <akib@disroot.org> wrote:
>> 
>> 1. Save the following in a file.
>> 
>> --8<---------------cut here---------------start------------->8---
>> (require 'cl-lib)
>> (defun bug59593-yank (&optional arg)
>>   (interactive "*P")
>>   (cl-letf* ((inhibit-read-only t)
>>              (insert-for-yank (symbol-function #'insert-for-yank))
>>              ((symbol-function #'insert-for-yank)
>>               (lambda (&rest args)
>>                 (cl-letf (((symbol-function #'insert)
>>                            (lambda (&rest args)
>>                              (message
>>                               "%S"
>>                               (mapconcat (lambda (arg)
>>                                            (if (stringp arg)
>>                                                arg
>>                                              (string arg)))
>>                                          args "")))))
>>                   (apply insert-for-yank args)))))
>>     (yank arg)))
>> --8<---------------cut here---------------end--------------->8---
>> 
>> 2. emacs -nw -Q -l FILE-FROM-STEP-1 -l PATH/TO/YOUR/SUBR.EL.GZ
>> 3. Kill something.
>> 4. M-x bug59593-yank.  Now you should see the yank text in echo area.
>> 5. emacs -nw -Q -l FILE-FROM-STEP-1 -l PATH/TO/ATTACHED/SUBR.ELC
>> 6. Kill something.
>> 7. M-x bug59593-yank.  The yank text got unexpectedly inserted.
>
> Am I missing something, or do you redefine a function and then expect it to 
> work like you never redefined it?

Unexpected: bug59593-yank just inserts the killed text.
Expected: bug59593-yank intercepts and shows the killed text in echo
area.

>
> And what do you mean by ATTACHED/SUBR.ELC?  I don't see any attachments to 
> your message.
>

I mean, the subr.elc attached in the original file.  I'm also attaching
the subr.elc I got from Feng Shu on Codeberg.

> So I'm still confused...

Is it clear now?  (Somehow, I think, no.)

-- 
Akib Azmain Turja, GPG key: 70018CE5819F17A3BBA666AFE74F0EFA922AE7F5
Fediverse: akib@hostux.social
Codeberg: akib
emailselfdefense.fsf.org | "Nothing can be secure without encryption."

Attachment: signature.asc
Description: PGP signature


reply via email to

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