1. Ivan Andrus
  2. sage-mode


Ivan Andrus  committed c939cdf

Fixed interaction with new python.el which requires a prompt before it can send a string

  • Participants
  • Parent commits a86eb04
  • Branches default

Comments (0)

Files changed (1)

File emacs/sage-mode.el

View file
   ;; In particular it has debugger and normal operation separated.
   ;; If we don't set them correctly things like completion don't work.
   (with-no-warnings ;; They give warnings with old python.el
-    (setq python-shell-prompt-regexp ">>>\\|sage:")
+    (setq python-shell-prompt-regexp ">>> \\|\\(sage: \\)+")
     (setq python-shell-prompt-pdb-regexp "[(<]*[Ii]?[PpGg]db[>)]+ ")
     ;; Respect python-shell-enable-font-lock
     (with-current-buffer sage-buffer
       (unless noshow (pop-to-buffer sage-buffer)) ; show progress
-      (run-hooks 'sage-startup-before-prompt-hook)
       (unless (inferior-sage-mode-p)
+      (run-hooks 'sage-startup-before-prompt-hook)
       ;; if there are commands to be executed after the prompt, wait for prompt...
       (when (and sage-startup-after-prompt-hook (inferior-sage-wait-for-prompt))