Subject: bug#76526: 30.1; kill-this-buffer not works normally

From: Eli Zaretskii <[email-masked]>
Date: Mon, 24 Feb 2025 21:10:24 +0200

tags 76526 notabug
thanks

> From: Magi Feeney <[email-masked]>
> Date: Mon, 24 Feb 2025 21:25:32 +0800
> 
> I tested the function kill-this-buffer with "emacs -Q", it consistently
> gives the output:
> 
> "command-execute: kill-this-buffer must be bound to an event with
> parameters"
> 
> and doesn't kill the current buffer.

Yes.  This is the intended behavior.  The function's doc string says:

  This command must be bound to a mouse event, and can be reliably
  invoked only from the menu bar, otherwise it could decide to silently
  do nothing or signal an error.  Use ‘kill-current-buffer’ if you
  need to invoke a similar command from keyboard.

This is not a bug.