emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] master 2f66cb0 007/215: Make realugd:process-filter-save buffer l


From: Rocky Bernstein
Subject: [elpa] master 2f66cb0 007/215: Make realugd:process-filter-save buffer local
Date: Sat, 30 Jul 2016 14:48:48 +0000 (UTC)

branch: master
commit 2f66cb09145716087d6ea03731f975c5e5232a72
Author: rocky <address@hidden>
Commit: rocky <address@hidden>

    Make realugd:process-filter-save buffer local
---
 realgud/common/eval.el |   15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

diff --git a/realgud/common/eval.el b/realgud/common/eval.el
index 0d8ebb0..1ba52a4 100644
--- a/realgud/common/eval.el
+++ b/realgud/common/eval.el
@@ -34,6 +34,10 @@
 (declare-function realgud-cmdbuf-pat 'realgud-send)
 (declare-function realgud:strip      'realgud-utils)
 
+(make-variable-buffer-local
+ (defvar realgud:process-filter-save nil
+   "realgud saves/restores the previous process filter here"))
+
 (defun realgud:tooltip-eval (event)
   "Show tip for identifier or selection under the mouse.
 The mouse must either point at an identifier or inside a selected
@@ -49,19 +53,22 @@ This function must return nil if it doesn't handle EVENT."
               (setq process (get-buffer-process cmdbuf))
               (posn-point (event-end event))
               )
-      (let ((expr (tooltip-expr-to-print event))
-           (original-filter (process-filter process)))
+      (let ((expr (tooltip-expr-to-print event)))
        (when expr
-         (set-process-filter process 'realgud:eval-process-output)
+         (with-current-buffer cmdbuf
+           (setq realgud:process-filter-save (process-filter process))
+           (set-process-filter process 'realgud:eval-process-output))
          (realgud:cmd-eval expr)
          ))
       )))
 
 (defun realgud:eval-process-output (process output-str)
   "Process debugger output and show it in a tooltip window."
-  (set-process-filter process 'comint-output-filter)
+  (set-process-filter process
+                     (or realgud:process-filter-save 'comint-output-filter))
   (with-current-buffer (realgud-get-cmdbuf)
     (goto-char (process-mark process))
+    (setq comint-last-input-end (process-mark process))
     (insert output-str)
     (set-marker (process-mark process) (point)))
     (setq comint-last-output-start



reply via email to

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