From 2ec6b7537eb30f149143c8c0a12a36231ec2ad94 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Mon, 23 Nov 1987 18:32:32 +0000 Subject: [PATCH] Conditionalize ^G synchronization code so that it is in effect only for hp-ux. --- etc/xscheme.el | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) diff --git a/etc/xscheme.el b/etc/xscheme.el index de6f9b24b..157c24397 100644 --- a/etc/xscheme.el +++ b/etc/xscheme.el @@ -21,7 +21,7 @@ ;;; Requires C-Scheme release 5 or later ;;; Changes to Control-G handler require runtime version 13.85 or later -;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/etc/xscheme.el,v 1.2 1987/11/02 20:19:30 cph Exp $ +;;; $Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/etc/xscheme.el,v 1.3 1987/11/23 18:32:32 cph Exp $ (require 'scheme) @@ -91,6 +91,11 @@ reading-string reading prompt string") "This variable, if nil, indicates that the scheme process is waiting for input. Otherwise, it is busy evaluating something.") +(defconst xscheme-control-g-synchronization-p (eq system-type 'hpux) + "If non-nil, insert markers in the scheme input stream to indicate when +control-g interrupts were signalled. Do not allow more control-g's to be +signalled until the scheme process acknowledges receipt.") + (defvar xscheme-control-g-disabled-p nil "This variable, if non-nil, indicates that a control-g is being processed by the scheme process, so additional control-g's are to be ignored.") @@ -238,13 +243,15 @@ Useful for working with `adb'." Control returns to the top level rep loop." (interactive) (let ((inhibit-quit t)) - (if xscheme-control-g-disabled-p - (message "Relax...") - (progn - (setq xscheme-control-g-disabled-p t) - (message "Sending C-G interrupt to Scheme...") - (interrupt-process "scheme" t) - (send-string "scheme" (char-to-string 0)))))) + (cond ((not xscheme-control-g-synchronization-p) + (interrupt-process "scheme" t)) + (xscheme-control-g-disabled-p + (message "Relax...")) + (else + (setq xscheme-control-g-disabled-p t) + (message "Sending C-G interrupt to Scheme...") + (interrupt-process "scheme" t) + (send-string "scheme" (char-to-string 0)))))) (defun xscheme-send-control-u-interrupt () "Cause the Scheme process to halt, returning to previous rep loop." @@ -384,7 +391,7 @@ Control returns to the top level rep loop." (substring string (1+ start)))) (progn (xscheme-process-filter:idle-1 string) (xscheme-process-filter:finish))))) - + (defun xscheme-process-filter:idle-1 (string) (while (string-match "\\(\007\\|\f\\)" string) (let ((start (match-beginning 0)) @@ -396,7 +403,7 @@ Control returns to the top level rep loop." (beep)) (setq string (substring string (1+ start))))) (xscheme-process-filter-output string)) - + (defun xscheme-process-filter:reading-type (string) (let ((len (length string))) (if (= 0 len) -- 2.25.1