From: dman <ds...@ri...> - 2002-01-24 03:36:42
|
On Thu, Jan 24, 2002 at 12:45:12AM +0100, Syver Enstad wrote: | Jon K Hellan <he...@ac...> writes: | > Here's what I do: | > | > (add-hook | > 'python-mode-hook | > (lambda () | > (let ((using-jython | > (save-excursion | > (goto-char (point-min)) | > (looking-at "#!.*\\(java\\|jp?ython\\)")))) | > (py-toggle-shells (if using-jython 'jpython 'cpython))))) | > | > | > This looks at the #! line at the top of the script and selects the | > appropriate interpreter. | | Cool, that should be in python-mode.el I suppose. Unfortunately I | can't use that trick as I don't use unix. Sure you can -- the '#' makes it a comment as far as python is concerned; it doesn't matter that your shell ignores it too. -D -- The light of the righteous shines brightly, but the lamp of the wicked is snuffed out. Proverbs 13:9 |