[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to make emacs prompt me before closing the last emacs gui frame when
From: |
Filipe Silva |
Subject: |
how to make emacs prompt me before closing the last emacs gui frame when running emacs as a daemon? |
Date: |
Sun, 5 Feb 2017 00:34:42 -0200 |
I now that if I set:
(setq confirm-kill-emacs 'y-or-n-p)
Then Emacs prompts me before I *kill* it.
But I want emacs to prompt me before I close my last gui frame (prompting
me before killing any frame would be very helpful already).
When you run emacs in daemon-mode, closing the last gui frame does not kill
emacs and thus the aforementioned setting does not work.
The problem is that sometimes I overpress my keybind to quit emacs windows
(evil-quit) and I endup quiting also my current gui frame,
which is annoying.
I know that before deleting the frame, emacs runs the functions that are
listed in the variable delete-frame-functions,
so I thought I could include a function there that would prompt me to query
if I really wanted to kill the frame.
But it is not clear from the documentation what I would have to do inside
that function to stop the process of killing the frame.
Another idea would be to add an advice to evil-quit, like: if daemon-p is t
then evil-quit have to prompt me to quit my current frame.
Or Something like that?
ps: I run GUI emacs from both OSx and GNU/Linux.
Thanks in advance!
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- how to make emacs prompt me before closing the last emacs gui frame when running emacs as a daemon?,
Filipe Silva <=