unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Kevin Rodgers <ihs_4664@yahoo.com>
Subject: Re: emacs and buffer switching
Date: Thu, 07 Dec 2006 12:39:58 -0700	[thread overview]
Message-ID: <el9qnu$msc$1@sea.gmane.org> (raw)
In-Reply-To: <sj1wnc90d3.fsf@gmail.com>

Hadron Quark wrote:
> Alas, its all a little more complicated. I need to call winring-init on
> the FIRST call to my ecb function but not on the others. In addition, if
> I manually turn off ecb, it should not turn it back on when I move to a
> c derivative.
> 
> at the mo I have:
> 
> 
> (defun ecb-first ()
>    (interactive)
>    (ecb-activate)
>    (ecb-winman-winring-enable-support)
>    (winring-initialize)
> )
> 
> (defun ecb-window-configuration ()
>   (if(derived-mode-p 'c-mode)
>     (ecb-activate) ;; **** call ecb-first on FIRST call??
> ;;    (ecb-deactivate);
>     ))
> 
> (add-hook 'window-configuration-change-hook 'ecb-window-configuration)
> 
> The problem is the need to activate ecb before winring if you want
> winring to support ecb. its all very messy and my elisp istn up to the
> task :(

Surely there is a variable that indicates whether winring has been
initialized yet.  Assuming that variable is called winring-initialized:

(defun ecb-window-configuration ()
   (if (derived-mode-p 'c-mode)
       (progn
	(ecb-activate)
	(unless winring-initialized
	  (ecb-winman-winring-enable-support)
	  (winring-initialize)))
     (ecb-deactivate)))

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

Have you considered asking the experts at ecb-list@lists.sourceforge.net
(see http://lists.sourceforge.net/lists/listinfo/ecb-list)?

-- 
Kevin

  reply	other threads:[~2006-12-07 19:39 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-06  0:09 emacs and buffer switching Hadron Quark
2006-12-06 17:11 ` Kevin Rodgers
     [not found] ` <mailman.1603.1165425138.2155.help-gnu-emacs@gnu.org>
2006-12-06 17:30   ` Hadron Quark
2006-12-06 20:57     ` Kevin Rodgers
     [not found]     ` <mailman.1615.1165438755.2155.help-gnu-emacs@gnu.org>
2006-12-06 21:32       ` Hadron Quark
2006-12-07 19:39         ` Kevin Rodgers [this message]
     [not found]         ` <mailman.1649.1165520479.2155.help-gnu-emacs@gnu.org>
2006-12-13  0:01           ` Hadron Quark

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='el9qnu$msc$1@sea.gmane.org' \
    --to=ihs_4664@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).