# HG changeset patch # User Stefan Monnier # Date 1081872336 0 # Node ID 6072018b576e37f9cb7e6b581130dc954f967eb8 # Parent 496ddc14c1a04c53c887a48ad05c3e10ee42ce00 (run-python): Use compilation-shell-minor-mode. Set compilation-error-regexp-alist earlier. diff -r 496ddc14c1a0 -r 6072018b576e lisp/progmodes/python.el --- a/lisp/progmodes/python.el Tue Apr 13 14:45:49 2004 +0000 +++ b/lisp/progmodes/python.el Tue Apr 13 16:05:36 2004 +0000 @@ -1062,24 +1062,10 @@ (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.