help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: delete frame automatically


From: henry atting
Subject: Re: delete frame automatically
Date: Sun, 10 Apr 2011 10:46:37 +0200
User-agent: Gnus/5.110016 (No Gnus v0.16) Emacs/24.0.50 (gnu/linux)

José A. Romero L. <escherdragon@gmail.com> writes:

> On Apr 9, 11:35, henry atting <nsmp...@online.de> wrote:
> (...)
>> How can I bring it about that the frame is deleted automatically when
>> I close ansi-term/tmux? As far a I know the
> (...)
>
> Write some advice around the term-sentinel function. Something like
> this should do the trick:
>
>     (defadvice term-sentinel (around my-advice-term-sentinel (proc
> msg))
>       (if (memq (process-status proc) '(signal exit))
>           (let ((buffer (process-buffer proc)) )
>             ad-do-it
>             (kill-buffer buffer)
>             (delete-frame))
>         ad-do-it))
>     (ad-activate 'term-sentinel)

Great, thanks. This works perfectly for term but not for multi-term.
In multi-term.el is a function (multi-term-handle-close) which closes
the current buffer when closing multi-term. Additionally to the above
lines I had to change it to take care of the current frame.

Cheers,
henry

-- 
http://literaturlatenight.de


reply via email to

[Prev in Thread] Current Thread [Next in Thread]