[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
killing an indirect buffer
From: |
Erik Iverson |
Subject: |
killing an indirect buffer |
Date: |
Mon, 01 Mar 2010 12:09:50 -0600 |
User-agent: |
Thunderbird 2.0.0.23 (X11/20090812) |
I am working with indirect buffers. According to the GNU Emacs manual,
"Killing the base buffer effectively kills the indirect buffer, but
killing an indirect buffer has no effect on its base buffer."
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)))
but then killing the indirect buffer will attempt to kill the
base-buffer which will attempt to kill the indirect buffer, which will
attempt ...
and I get "not: Lisp nesting exceeds `max-lisp-eval-depth'"
Thanks!
Erik Iverson
- killing an indirect buffer,
Erik Iverson <=