|
From: | Michael Heerdegen |
Subject: | Re: [Feature request] I suggest delete-frame command can prompt user for confirmation |
Date: | Mon, 15 Nov 2021 02:15:17 +0100 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
"Christopher M. Miles" <numbchild@gmail.com> writes: > #+begin_src emacs-lisp > (defun my/delete-frame-confirm (origin-func &optional args) > "Ask user to confirm whether really delete frame. > To avoid accidentally [C-x 5 0] delete frame which confused with keybinding > [C-x 5 o]." > (if (yes-or-no-p "Are you sure to delete current frame? ") > (apply origin-func args) > (message "I don't want to delete frame accidently!"))) > > (advice-add 'delete-frame :around #'my/delete-frame-confirm) > #+end_src > > What do you think? I think it would be annoying and soon you would as often accidentally say "yes" as you accidentally close frames now. At least I can say that it would not work for me. Wouldn't it be much more useful to be able to restore a killed frame? Michael.
[Prev in Thread] | Current Thread | [Next in Thread] |