Subject: bug#74166: [PATCH] Fix tmm "previous menu" shortcut

From: Juri Linkov <[email-masked]>
Date: Sat, 02 Nov 2024 19:10:10 +0200

> +(defun tmm-clear-self-insert-and-exit ()
> +  "Clear the minibuffer content before self insert and exit."
> +  (interactive)
> +  (delete-region (minibuffer-prompt-end) (point-max))
> +  (self-insert-and-exit))

There is a special function 'delete-minibuffer-contents'
like is used e.g. in 'read-char-from-minibuffer-insert-char'
and 'y-or-n-p-insert-y'.