aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Davison2012-05-17 00:03:40 -0300
committerFabián Ezequiel Gallina2012-05-17 00:03:40 -0300
commitb4b661d885a9fd771f5b165142bc89c6c9f243bf (patch)
tree3f7d0ade63322fab2947df9a8f2cda871ef1de66
parent6da55e5931e899acb1b7da2206967aa56da3ca0f (diff)
downloademacs-b4b661d885a9fd771f5b165142bc89c6c9f243bf.tar.gz
emacs-b4b661d885a9fd771f5b165142bc89c6c9f243bf.zip
Customizable variable to control syntax highlighting in shell.
Default is on.
-rw-r--r--lisp/progmodes/python.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 16a3befc3f2..75b9f0c087e 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1223,6 +1223,13 @@ It should not contain a caret (^) at the beginning."
1223 :group 'python 1223 :group 'python
1224 :safe 'stringp) 1224 :safe 'stringp)
1225 1225
1226(defcustom python-shell-enable-syntax-highlighting t
1227 "Should syntax highlighting be enabled in the python shell buffer?
1228Restart the python shell after changing this variable for it to take effect."
1229 :type 'boolean
1230 :group 'python
1231 :safe 'booleanp)
1232
1226(defcustom python-shell-send-setup-max-wait 5 1233(defcustom python-shell-send-setup-max-wait 5
1227 "Seconds to wait for process output before code setup. 1234 "Seconds to wait for process output before code setup.
1228If output is received before the especified time then control is 1235If output is received before the especified time then control is
@@ -1382,6 +1389,7 @@ controls which Python interpreter is run. Variables
1382`python-shell-prompt-regexp', 1389`python-shell-prompt-regexp',
1383`python-shell-prompt-output-regexp', 1390`python-shell-prompt-output-regexp',
1384`python-shell-prompt-block-regexp', 1391`python-shell-prompt-block-regexp',
1392`python-shell-enable-syntax-highlighting',
1385`python-shell-completion-setup-code', 1393`python-shell-completion-setup-code',
1386`python-shell-completion-string-code', 1394`python-shell-completion-string-code',
1387`python-shell-completion-module-string-code', 1395`python-shell-completion-module-string-code',
@@ -1415,6 +1423,12 @@ variable.
1415 'python-shell-completion-complete-at-point) 1423 'python-shell-completion-complete-at-point)
1416 (define-key inferior-python-mode-map (kbd "<tab>") 1424 (define-key inferior-python-mode-map (kbd "<tab>")
1417 'python-shell-completion-complete-or-indent) 1425 'python-shell-completion-complete-or-indent)
1426 (when python-shell-enable-syntax-highlighting
1427 (set
1428 (make-local-variable 'font-lock-defaults)
1429 '(python-font-lock-keywords
1430 nil nil nil nil
1431 (font-lock-syntactic-keywords . python-font-lock-syntactic-keywords))))
1418 (compilation-shell-minor-mode 1)) 1432 (compilation-shell-minor-mode 1))
1419 1433
1420(defun python-shell-make-comint (cmd proc-name &optional pop) 1434(defun python-shell-make-comint (cmd proc-name &optional pop)