[OS X Emacs] Bind code to the jujubes?

David Reitter david.reitter at gmail.com
Tue Feb 15 13:20:01 EST 2011


On Feb 15, 2011, at 1:05 PM, Jack Repenning wrote:

> I find that clicking the red jujube (dismiss this window) achieves almost, but not quite, the same thing as C-x C-c. Both make the frame disappear and kill the buffer (after possibly asking whether I really meant that, if the buffer is presently modified). However, frames that were killed with C-x C-c stay dead, whereas frames that were killed with the jujube sometimes reappear in a ghostly, zombie-like not quite functionally staggering sort of way.
> 
> I'm thinking that, if I could just bind the red jujube to the same code as C-x C-c, my life would be sweet.

This is Aquamacs, right?

I doubt that what you are proposing is a solution to your problem, but you can bind code to the <delete-frame> event.
If that doesn't catch the event for you, just redefine `handle-delete-frame':

(defun handle-delete-frame (event)
  "Handle delete-frame events from the X server."
  (interactive "e")
  (let ((frame (posn-window (event-start event)))
 ... ))

And if, in a current Aquamacs version, you figure out in what circumstances the ghost-like frames show up, make a bug report (through the official channel, with the necessary info like version numbers etc., and I will try to fix the problem!


--
http://aquamacs.org -- Aquamacs: Emacs on Mac OS X
http://aquamacs.org/donate -- Could we help you? Return the favor and support the Aquamacs Project!







More information about the MacOSX-Emacs mailing list