bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#12751: 24.2.50; Inferior python mode hangs


From: Jorgen Schaefer
Subject: bug#12751: 24.2.50; Inferior python mode hangs
Date: Sun, 28 Oct 2012 19:37:40 +0100

Hello!

In current Emacs from bzr, running M-x run-python hangs Emacs until the
user hits C-g, repeatedly, every time there is input to the subprocess.
This results in the following message (from *Messages*):

Error during redisplay: (jit-lock-function 1) signaled (quit)
Error during redisplay: (jit-lock-function 256) signaled (quit)
Error during redisplay: (jit-lock-function 274) signaled (quit)
Error during redisplay: (jit-lock-function 275) signaled (quit)
Quit [3 times]
QuitError during redisplay: (jit-lock-function 284) signaled (quit)
Error during redisplay: (jit-lock-function 285) signaled (quit)
....

The problem seems to be in `inferior-python-mode'. Setting
`python-shell-enable-font-lock' to nil fixes it immediately. More
specifically, in this piece of code:

    (set (make-local-variable 'syntax-propertize-function)
         (syntax-propertize-rules
          (comint-prompt-regexp
           (0 (ignore
               (put-text-property
                comint-last-input-start end 'syntax-table
                python-shell-output-syntax-table)
               (font-lock-unfontify-region comint-last-input-start end))))
          ((python-rx string-delimiter)
           (0 (ignore
               (and (not (eq (get-text-property start 'field) 'output))
                    (python-syntax-stringify)))))
          ))

The (comint-promot-regexp ...) clause seems to be causing the problem.
Commenting that out makes the subprocess run fine.

I have to admit I have no idea what that's supposed to do anyhow. The
variable END isn't defined at all, and `ignore' will make it all nil
anyhow. But maybe I'm missing something important.

Regards,
Jorgen





reply via email to

[Prev in Thread] Current Thread [Next in Thread]