From 1d01054a73345e7e38e29660e52806bfe6b65e65 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 6 Jan 1995 17:47:09 +0000 Subject: [PATCH] Fix problem with init-file loading: if the init file deletes the initial buffer or sets an inhibition flag, don't start the inferior REPL. --- v7/src/edwin/editor.scm | 34 +++++++++++++++++++--------------- 1 file changed, 19 insertions(+), 15 deletions(-) diff --git a/v7/src/edwin/editor.scm b/v7/src/edwin/editor.scm index fc5dce670..0ab19abed 100644 --- a/v7/src/edwin/editor.scm +++ b/v7/src/edwin/editor.scm @@ -1,6 +1,6 @@ ;;; -*-Scheme-*- ;;; -;;; $Id: editor.scm,v 1.238 1995/01/06 01:01:50 cph Exp $ +;;; $Id: editor.scm,v 1.239 1995/01/06 17:47:09 cph Exp $ ;;; ;;; Copyright (c) 1986, 1989-95 Massachusetts Institute of Technology ;;; @@ -193,23 +193,27 @@ (load-edwin-file filename '(EDWIN) #t))) (set! init-file-loaded? #t) unspecific)))) - (start-inferior-repl! - (current-buffer) - (nearest-repl/environment) - (nearest-repl/syntax-table) - (and (not (ref-variable inhibit-startup-message)) - (cmdl-message/append - (cmdl-message/active - (lambda (port) - (identify-world port) - (newline port) - (newline port))) - (cmdl-message/strings - "You are in an interaction window of the Edwin editor." - "Type C-h for help. C-h m will describe some commands."))))) + (let ((buffer (find-buffer initial-buffer-name))) + (if (and buffer + (not inhibit-initial-inferior-repl?)) + (start-inferior-repl! + (current-buffer) + (nearest-repl/environment) + (nearest-repl/syntax-table) + (and (not (ref-variable inhibit-startup-message)) + (cmdl-message/append + (cmdl-message/active + (lambda (port) + (identify-world port) + (newline port) + (newline port))) + (cmdl-message/strings + "You are in an interaction window of the Edwin editor." + "Type C-h for help. C-h m will describe some commands."))))))) (define inhibit-editor-init-file? #f) (define init-file-loaded? #f) +(define inhibit-initial-inferior-repl? #f) (define-variable inhibit-startup-message "True inhibits the initial startup messages. -- 2.25.1