aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Monnier2006-11-14 15:34:15 +0000
committerStefan Monnier2006-11-14 15:34:15 +0000
commit71884b8d18e51852e312c41eb02634b2647e483c (patch)
tree6d6d3caa38d8c4a822073696155ffba144528835
parent65694d6465e0742197aed64f7d8b598bbbfabd85 (diff)
downloademacs-71884b8d18e51852e312c41eb02634b2647e483c.tar.gz
emacs-71884b8d18e51852e312c41eb02634b2647e483c.zip
(inferior-python-mode-syntax-table): New var.
(inferior-python-mode): Use it.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/progmodes/python.el10
2 files changed, 14 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5b7814d2c49..5ecc5df29b0 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12006-11-14 Stefan Monnier <monnier@iro.umontreal.ca>
2
3 * progmodes/python.el (inferior-python-mode-syntax-table): New var.
4 (inferior-python-mode): Use it.
5
12006-11-14 Andreas Schwab <schwab@suse.de> 62006-11-14 Andreas Schwab <schwab@suse.de>
2 7
3 * term/xterm.el (terminal-init-xterm): Add more key bindings. 8 * 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.")
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