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

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

Re: killing an indirect buffer


From: Stefan Monnier
Subject: Re: killing an indirect buffer
Date: Mon, 01 Mar 2010 16:43:39 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1.92 (gnu/linux)

> But I do want the base-buffer killed when a user kills the indirect buffer
> in my specific application. Can anyone think of a way to have the
> base-buffer killed when an indirect buffer is killed?  I first thought of
> something like the following hook, made buffer-local in my indirect buffer:

>   (add-hook 'kill-buffer-hook 'my-kill-buffer-hook-fun)

>   (defun my-kill-buffer-hook-fun ()
>      (kill-buffer (buffer-base-buffer)))

You can try:

  (defun my-kill-buffer-hook-fun ()
    (let ((kill-buffer-hook nil))
     (kill-buffer (buffer-base-buffer))))

You'll also want to try and make sure that your my-kill-buffer-hook-fun
is run last in kill-buffer-hook.


        Stefan


reply via email to

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