summaryrefslogtreecommitdiff
path: root/lisp/progmodes/python.el
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2004-04-13 16:05:36 +0000
committerStefan Monnier <monnier@iro.umontreal.ca>2004-04-13 16:05:36 +0000
commitf9f25632b33a48f0f01ac024f66fa0eae0cabff1 (patch)
tree33bcc09017b985bd8694cf97e5e71a8d988ce3ae /lisp/progmodes/python.el
parent38b9d7d9140b4963f5d86f754d867de29c16ff34 (diff)
(run-python): Use compilation-shell-minor-mode.
Set compilation-error-regexp-alist earlier.
Diffstat (limited to 'lisp/progmodes/python.el')
-rw-r--r--lisp/progmodes/python.el20
1 files changed, 3 insertions, 17 deletions
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 1028e937924..ee752f78352 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1062,24 +1062,10 @@ def _emacs_execfile (file):
(setq python-command cmd)
(setq python-buffer "*Python*")
(pop-to-buffer "*Python*")
- (compilation-minor-mode 1)
- (add-hook 'comint-input-filter-functions 'python-input-filter nil t)
- ;; Avoid clobbering comint bindings.
- (set (make-local-variable 'minor-mode-overriding-map-alist)
- `((compilation-minor-mode
- . ,(let ((map (make-sparse-keymap)))
- ;; It would be useful to put keymap properties on the
- ;; error lines so that we could use RET and mouse-2 on
- ;; them directly. These bindings will only DTRT with
- ;; the font-lock-style compilation mode.
- (define-key map [mouse-2] #'python-mouse-2-command)
- (define-key map "\C-m" #'python-RET-command)
- (if (boundp 'compilation-menu-map)
- (define-key map [menu-bar compilation]
- (cons "Errors" compilation-menu-map)))
- map))))
(set (make-local-variable 'compilation-error-regexp-alist)
- python-compilation-regexp-alist))
+ python-compilation-regexp-alist)
+ (compilation-shell-minor-mode 1)
+ (add-hook 'comint-input-filter-functions 'python-input-filter nil t))
(defun python-mouse-2-command (event)
"Command bound to `mouse-2' in inferior Python buffer.