summaryrefslogtreecommitdiff
path: root/zwgc/zwgc.el
diff options
context:
space:
mode:
authorGravatar John Kohl <jtkohl@mit.edu>1989-11-15 16:18:28 +0000
committerGravatar John Kohl <jtkohl@mit.edu>1989-11-15 16:18:28 +0000
commit18e3b32da915561a15881ad75debf54be96d6ac8 (patch)
tree724e69f0dded30e66499d67b6b67718bc8ffb1e6 /zwgc/zwgc.el
parentac35334527c740c70045a9d15cf04e08fa003089 (diff)
fix up zwgc-wakeup to remove ^M's
Diffstat (limited to 'zwgc/zwgc.el')
-rw-r--r--zwgc/zwgc.el27
1 files changed, 16 insertions, 11 deletions
diff --git a/zwgc/zwgc.el b/zwgc/zwgc.el
index a0941b7..bb080ed 100644
--- a/zwgc/zwgc.el
+++ b/zwgc/zwgc.el
@@ -32,7 +32,7 @@
; enddoes
;
(defvar zwgc_el-RCS-id)
-(setq zwgc_el-RCS-id "$Header$")
+(setq zwgc_el-RCS-id "$Id$")
;
;
@@ -47,16 +47,21 @@
(defun zwgc-wakeup (proc string)
"Procedure called when zwgc spits something out"
- (save-excursion (set-buffer (get-buffer "*zwgc*"))
- (goto-char (point-max))
- (if (= 7 (string-to-char string))
- (progn
- (ding 1)
- (message "got one!")
- (narrow-to-string string))
- (insert string)))
- (Special-pop-up-window (get-buffer "*zwgc*"))
- )
+ (let (start-limit)
+ (save-excursion (set-buffer (get-buffer "*zwgc*"))
+ (setq start-limit (point))
+ (goto-char (point-max))
+ (if (= 7 (string-to-char string))
+ (progn
+ (ding 1)
+ (message "got one!")
+ (narrow-to-string string))
+ (insert string))
+ (search-backward "\007" start-limit t)
+ (while (search-forward "\015" (point-max) t) ;flush ^M's
+ (delete-backward-char 1)))
+ (Special-pop-up-window (get-buffer "*zwgc*"))
+ ))
(defun zwgc ()
"emacs mode for running zwgc in a sub process of emacs. It pops up a