[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Intercepting windowClosed (OS X or in general)
From: |
Kevin Rodgers |
Subject: |
Re: Intercepting windowClosed (OS X or in general) |
Date: |
Thu, 05 May 2005 11:18:48 -0600 |
User-agent: |
Mozilla Thunderbird 0.9 (X11/20041105) |
David Reitter wrote:
> Stefan Monnier writes:
>>>how would one intercept handling of windowClosed events, that is, when
>>>a user clicks the closer button to delete a frame. I would ideally
like to
>>>advise a function to do something special or use a hook.
>>
>>delete-frame-hook, maybe?
>
> Thanks, but I assume this would be fired when a frame is deleted
> automatically, too. I think there's a function to check if it was a
> mouse event, right?
C-h v last-input-event
C-h v last-command-event
C-h f event-basic-type
> But I found an easier way - that is to redefine handle-delete-frame to
> do what I want.
>
> Works. (For now, at least.)
Redefined via defadvice, I hope.
> Oh, is there a list of *all* hooks somewhere? This delete-frame-hook
> is not listed on the "standard hooks" page of the elisp manual. Or,
> search documentation for .*-hooks? ?
M-x apropos-variable RET -hook\'
--
Kevin Rodgers