From: Stefan Monnier Date: Tue, 14 Nov 2006 15:34:15 +0000 (+0000) Subject: (inferior-python-mode-syntax-table): New var. X-Git-Tag: emacs-pretest-22.0.91~61 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=71884b8d18e51852e312c41eb02634b2647e483c;p=emacs.git (inferior-python-mode-syntax-table): New var. (inferior-python-mode): Use it. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5b7814d2c49..5ecc5df29b0 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2006-11-14 Stefan Monnier + + * progmodes/python.el (inferior-python-mode-syntax-table): New var. + (inferior-python-mode): Use it. + 2006-11-14 Andreas Schwab * term/xterm.el (terminal-init-xterm): Add more key bindings. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 4d9a49a6b8d..24e9f65f180 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -1194,6 +1194,15 @@ local value.") ;; (define-key map "\C-c\C-f" 'python-describe-symbol) map)) +(defvar inferior-python-mode-syntax-table + (let ((st (make-syntax-table python-mode-syntax-table))) + ;; Don't get confused by apostrophes in the process's output (e.g. if + ;; you execute "help(os)"). + (modify-syntax-entry ?\' "." st) + ;; Maybe we should do the same for double quotes? + ;; (modify-syntax-entry ?\" "." st) + st)) + ;; Fixme: This should inherit some stuff from `python-mode', but I'm ;; not sure how much: at least some keybindings, like C-c C-f; ;; syntax?; font-locking, e.g. for triple-quoted strings? @@ -1216,7 +1225,6 @@ For running multiple processes in multiple buffers, see `run-python' and \\{inferior-python-mode-map}" :group 'python - (set-syntax-table python-mode-syntax-table) (setq mode-line-process '(":%s")) (set (make-local-variable 'comint-input-filter) 'python-input-filter) (add-hook 'comint-preoutput-filter-functions #'python-preoutput-filter