aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorStefan Monnier2006-11-14 15:34:15 +0000
committerStefan Monnier2006-11-14 15:34:15 +0000
commit71884b8d18e51852e312c41eb02634b2647e483c (patch)
tree6d6d3caa38d8c4a822073696155ffba144528835 /lisp/progmodes/python.el
parent65694d6465e0742197aed64f7d8b598bbbfabd85 (diff)
downloademacs-71884b8d18e51852e312c41eb02634b2647e483c.tar.gz
emacs-71884b8d18e51852e312c41eb02634b2647e483c.zip
(inferior-python-mode-syntax-table): New var.
(inferior-python-mode): Use it.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el10
1 files changed, 9 insertions, 1 deletions
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.")
1194 ;; (define-key map "\C-c\C-f" 'python-describe-symbol) 1194 ;; (define-key map "\C-c\C-f" 'python-describe-symbol)
1195 map)) 1195 map))
1196 1196
1197(defvar inferior-python-mode-syntax-table
1198 (let ((st (make-syntax-table python-mode-syntax-table)))
1199 ;; Don't get confused by apostrophes in the process's output (e.g. if
1200 ;; you execute "help(os)").
1201 (modify-syntax-entry ?\' "." st)
1202 ;; Maybe we should do the same for double quotes?
1203 ;; (modify-syntax-entry ?\" "." st)
1204 st))
1205
1197;; Fixme: This should inherit some stuff from `python-mode', but I'm 1206;; Fixme: This should inherit some stuff from `python-mode', but I'm
1198;; not sure how much: at least some keybindings, like C-c C-f; 1207;; not sure how much: at least some keybindings, like C-c C-f;
1199;; syntax?; font-locking, e.g. for triple-quoted strings? 1208;; syntax?; font-locking, e.g. for triple-quoted strings?
@@ -1216,7 +1225,6 @@ For running multiple processes in multiple buffers, see `run-python' and
1216 1225
1217\\{inferior-python-mode-map}" 1226\\{inferior-python-mode-map}"
1218 :group 'python 1227 :group 'python
1219 (set-syntax-table python-mode-syntax-table)
1220 (setq mode-line-process '(":%s")) 1228 (setq mode-line-process '(":%s"))
1221 (set (make-local-variable 'comint-input-filter) 'python-input-filter) 1229 (set (make-local-variable 'comint-input-filter) 'python-input-filter)
1222 (add-hook 'comint-preoutput-filter-functions #'python-preoutput-filter 1230 (add-hook 'comint-preoutput-filter-functions #'python-preoutput-filter