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

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

Re: emacs and buffer switching


From: Kevin Rodgers
Subject: Re: emacs and buffer switching
Date: Wed, 06 Dec 2006 10:11:02 -0700
User-agent: Thunderbird 1.5.0.8 (Windows/20061025)

Hadron Quark wrote:
I have a c-mode-common hook which activates ecb (code browser) when I
load a c file. But how to activate it when I switch to an existing c
buffer? I am already switching layouts with winring, but wish for the
ecb layout to pop up if I switch from a single buffer frame to an
already loaded c file.

c-mode-common-hook is the wrong place to do that.  But something like
this might work for you:

(defun ecb-window-configuration ()
  (when (derived-mode-p 'c-mode)
    ;; activate ECB here
    ))

(add-hook 'window-configuration-change-hook 'ecb-window-configuration)

--
Kevin





reply via email to

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