#@+leo-ver=4
#@+node:@file xemacs.py
"""emacs handler"""

from leoPlugins import *
from leoGlobals import *

# path = "/usr/bin/gnuclient"
path = r"c:\Program Files\XEmacs\XEmacs-21.4.13\i586-pc-win32\xemacs.exe"

def open_in_emacs (tag,keywords):
	top() and top().openWith(("os.spawnl",path,None),)

# Register the handlers...

if 1: # Edit when double-clicking a node's icon.
	registerHandler("icondclick2", open_in_emacs) # 1/29/03: activate on _double_ click.
else: # Edit when selecting any node. That's a bit much for my taste.
	registerHandler("select2", open_in_emacs)

__version__ = "1.4"
plugin_signon(__name__)
#@nonl
#@-node:@file xemacs.py
#@-leo
