comparison lisp/progmodes/python.el @ 90667:dbe3f29e61d6

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 505-522) - Update from CVS - Merge from gnus--rel--5.10 - Update from CVS: etc/TUTORIAL.cn: Updated. - Merge from erc--emacs--22 * gnus--rel--5.10 (patch 164-167) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-137
author Miles Bader <miles@gnu.org>
date Tue, 21 Nov 2006 08:56:38 +0000
parents 7eeafaaa9eab 871131fc9087
children f1d13e615070
comparison
equal deleted inserted replaced
90666:00d54c8fa693 90667:dbe3f29e61d6
1192 1192
1193 ;; (define-key map [(meta ?\t)] 'python-complete-symbol) 1193 ;; (define-key map [(meta ?\t)] 'python-complete-symbol)
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?
1200 (define-derived-mode inferior-python-mode comint-mode "Inferior Python" 1209 (define-derived-mode inferior-python-mode comint-mode "Inferior Python"
1201 "Major mode for interacting with an inferior Python process. 1210 "Major mode for interacting with an inferior Python process.
1214 For running multiple processes in multiple buffers, see `run-python' and 1223 For running multiple processes in multiple buffers, see `run-python' and
1215 `python-buffer'. 1224 `python-buffer'.
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
1223 nil t) 1231 nil t)
1224 ;; Still required by `comint-redirect-send-command', for instance 1232 ;; Still required by `comint-redirect-send-command', for instance