Re: emacs mystery
On 2011-10-07 04:50 +0200, Marc Auslander wrote:
> After upgrade to squeeze, I have the following emacs curiosity.
>
> I bind C-xC-c to:
>
> (defun ctrlxctrlc () "Careful exit from emacs"
> (interactive)
> (if (y-or-n-p "Do you really want to exit emacs? ")
> (save-buffers-kill-emacs)
> (message "")
> ))
>
> to avoid accidentally closing emacs.
You are aware that this is easier done (since Emacs 21) with
(setq confirm-kill-emacs 'y-or-n-p) ?
And in Emacs 23, C-x C-c runs a different command than
save-buffers-kill-emacs (though it only matters if you use multiple
terminals).
> Under squeeze, for all three versions of emacs (21, 22,23) if I do
> C-xC-c and then respond y to the prompt, emacs closes and a y is sent
> to the xterm that launched emacs!
I cannot reproduce this on sid with Emacs 23.3 and xterm 271.
Sven
Reply to: