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

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

Re: delete frame automatically


From: José A . Romero L .
Subject: Re: delete frame automatically
Date: Sat, 9 Apr 2011 15:49:46 -0700 (PDT)
User-agent: G2/1.0

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)

Cheers,
--
José A. Romero L.
escherdragon at gmail
"We who cut mere stones must always be envisioning cathedrals."
(Quarry worker's creed)


reply via email to

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