X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=python%2Finit_python.el;h=11458f582803c106382e0bde8be2453785e35b41;hb=5f3c695024b3619e7239e9177cca2a07792f9876;hp=d45a25acdc39a6a16b3d631cf74add99f9e82924;hpb=c092392ed120e24105657ad2ac61a7fd03261b2d;p=emacs-init.git diff --git a/python/init_python.el b/python/init_python.el index d45a25a..11458f5 100644 --- a/python/init_python.el +++ b/python/init_python.el @@ -74,6 +74,12 @@ (flymake-goto-next-error) (my-flymake-show-error)) +(defun my-flymake-goto-prev-error () + (interactive) + (my-flymake-check-and-wait) + (flymake-goto-prev-error) + (my-flymake-show-error)) + (defun py-find-file (errormark filename defaultdir) (let ((fullname (expand-file-name filename defaultdir))) (or (and (not (file-exists-p fullname)) @@ -117,6 +123,8 @@ (progn (set (make-local-variable 'py-eshell-last-error) (point)) (set (make-local-variable 'py-eshell-prefix) (or (match-string 1) "")) + (if (string-match "Original $" py-eshell-prefix) + (setq py-eshell-prefix (substring py-eshell-prefix 0 (match-beginning 0)))) (if example (forward-line 2) (while (and (< (forward-line 1) 1) (looking-at (concat py-eshell-prefix " "))))) @@ -207,6 +215,7 @@ (define-key python-mode-map "\C-ci" 'my-pyflymake-add-import-from-error) (define-key python-mode-map "\C-ce" 'my-flymake-show-error) (define-key python-mode-map "\C-cn" 'my-flymake-goto-next-error) + (define-key python-mode-map "\C-cp" 'my-flymake-goto-prev-error) (define-key python-mode-map "\C-cI" 'py-cleanup-imports) ) @@ -292,6 +301,7 @@ (local-file (file-relative-name temp-file (file-name-directory buffer-file-name)))) + (message "flymake init pyflakes %s" local-file) (list "pyflakes" (list local-file)))) (add-to-list 'flymake-allowed-file-name-masks '("\\.py\\'" flymake-pyflakes-init)))