• Barry Warsaw's avatar
    SF patch #510288 by Kevin J. Butler, mod'd by Barry. This provides · 88491611
    Barry Warsaw yazdı
    better auto-recognition of a Jython file vs. a CPython (or agnostic)
    file by looking at the #! line more closely, and inspecting the import
    statements in the first 20000 bytes (configurable).  Specifically,
    
    (py-import-check-point-max): New variable, controlling how far into
    the buffer it will search for import statements.
    
    (py-jpython-packages): List of package names that are Jython-ish.
    
    (py-shell-alist): List of #! line programs and the modes associated
    with them.
    
    (jpython-mode-hook): Extra hook that runs when entering jpython-mode
    (what about Jython mode? <20k wink>).
    
    (py-choose-shell-by-shebang, py-choose-shell-by-import,
    py-choose-shell): New functions.
    
    (python-mode): Use py-choose-shell.
    
    (jpython-mode): New command.
    
    (py-execute-region): Don't use my previous hacky attempt at doing
    this, use the new py-choose-shell function.
    
    One other thing this file now does: it attempts to add the proper
    hooks to interpreter-mode-alist and auto-mode-alist if they aren't
    already there.  Might help with Emacs users since that editor doesn't
    come with python-mode by default.
    88491611
Adı
Son kayıt (commit)
Son güncelleme
Demo Loading commit data...
Doc Loading commit data...
Grammar Loading commit data...
Include Loading commit data...
Lib Loading commit data...
Mac Loading commit data...
Misc Loading commit data...
Modules Loading commit data...
Objects Loading commit data...
PC Loading commit data...
PCbuild Loading commit data...
Parser Loading commit data...
Python Loading commit data...
RISCOS Loading commit data...
Tools Loading commit data...
.cvsignore Loading commit data...
.hgtags Loading commit data...
LICENSE Loading commit data...
Makefile.pre.in Loading commit data...
PLAN.txt Loading commit data...
README Loading commit data...
configure Loading commit data...
configure.in Loading commit data...
install-sh Loading commit data...
pyconfig.h.in Loading commit data...
setup.py Loading commit data...