Mercurial > emacs
diff lisp/progmodes/python.el @ 74001:871131fc9087
(inferior-python-mode-syntax-table): New var.
(inferior-python-mode): Use it.
| author | Stefan Monnier <monnier@iro.umontreal.ca> |
|---|---|
| date | Tue, 14 Nov 2006 15:34:15 +0000 |
| parents | 664e876d97fd |
| children | 1c8bca402ae7 dbe3f29e61d6 |
line wrap: on
line diff
--- a/lisp/progmodes/python.el Tue Nov 14 12:07:18 2006 +0000 +++ b/lisp/progmodes/python.el Tue Nov 14 15:34:15 2006 +0000 @@ -1194,6 +1194,15 @@ ;; (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 @@ \\{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
