diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-15 19:54:14 +0100 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2009-02-15 19:54:14 +0100 |
commit | 9df5971ee7aa9c5562a96c4e0af3be944b9fd78b (patch) | |
tree | 9c666008df9c19117794f559d18901d4906e50a1 /elisp/geiser-connection.el | |
parent | 8d137f9e77811f16d536f73cc1c059a77782f7de (diff) | |
download | geiser-9df5971ee7aa9c5562a96c4e0af3be944b9fd78b.tar.gz geiser-9df5971ee7aa9c5562a96c4e0af3be944b9fd78b.tar.bz2 |
Avoing REPL modeline message flickering on redirection.
Diffstat (limited to 'elisp/geiser-connection.el')
-rw-r--r-- | elisp/geiser-connection.el | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el index 7a73adc..b78982c 100644 --- a/elisp/geiser-connection.el +++ b/elisp/geiser-connection.el @@ -135,20 +135,18 @@ (defun geiser-con--cleanup-connection (c) (geiser-con--connection-cancel-timer c)) -(defun geiser-con--setup-connection (buffer) +(defun geiser-con--setup-connection (buffer prompt-regexp) (with-current-buffer buffer (when geiser-con--connection (geiser-con--cleanup-connection geiser-con--connection)) (setq geiser-con--connection (geiser-con--make-connection buffer)) - (geiser-con--setup-comint) + (geiser-con--setup-comint prompt-regexp) (geiser-con--connection-start-timer geiser-con--connection) (message "Geiser REPL up and running!"))) -(defconst geiser-con--prompt-regex "^[^() \n]+@([^)]*?)> ") - -(defun geiser-con--setup-comint () +(defun geiser-con--setup-comint (prompt-regexp) (set (make-local-variable 'comint-redirect-insert-matching-regexp) nil) - (set (make-local-variable 'comint-redirect-finished-regexp) geiser-con--prompt-regex) + (set (make-local-variable 'comint-redirect-finished-regexp) prompt-regexp) (add-hook 'comint-redirect-hook 'geiser-con--comint-redirect-hook nil t)) @@ -203,6 +201,12 @@ (geiser-con--process-completed-request req) (geiser-con--connection-clean-current-request geiser-con--connection))))) +(defadvice comint-redirect-setup + (after geiser-con--advice (output-buffer comint-buffer finished-regexp &optional echo)) + (with-current-buffer comint-buffer + (when geiser-con--connection (setq mode-line-process nil)))) +(ad-activate 'comint-redirect-setup) + ;;; Message sending interface: |