1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-11 06:20:23 +02:00

* boot-9.scm: Don't assume that this file is loaded just before

entering a read-eval-print loop.  Turn code to load (ice-9 emacs)
into...
(load-emacs-interface): New function.
(top-repl): Call it, if use-emacs-interface is defined and true.
At this point, we *do* know we're about to enter a REPL.
This commit is contained in:
Jim Blandy 1998-10-19 13:49:29 +00:00
parent 440e7b07bd
commit 9aca88c39a

View file

@ -2836,6 +2836,14 @@
(define load load-module)
;;; {Load emacs interface support if emacs option is given.}
(define (load-emacs-interface)
(if (memq 'debug-extensions *features*)
(debug-enable 'backtrace))
(define-module (guile-user) :use-module (ice-9 emacs)))
;;; {I/O functions for Tcl channels (disabled)}
@ -2875,6 +2883,12 @@
;; this is just (scm-style-repl) with a wrapper to install and remove
;; signal handlers.
(define (top-repl)
;; Load emacs interface support if emacs option is given.
(if (and (module-defined? the-root-module 'use-emacs-interface)
use-emacs-interface)
(load-emacs-interface))
(let ((old-handlers #f)
(signals `((,SIGINT . "User interrupt")
(,SIGFPE . "Arithmetic error")
@ -2977,19 +2991,6 @@
(if (memq 'threads *features*)
(define-module (guile-user) :use-module (ice-9 threads)))
;;; {Load emacs interface support if emacs option is given.}
;;;
;;; *fixme* This is a temporary solution.
;;;
(if (and (module-defined? the-root-module 'use-emacs-interface)
use-emacs-interface)
(begin
(if (memq 'debug-extensions *features*)
(debug-enable 'backtrace))
(define-module (guile-user) :use-module (ice-9 emacs))))
;;; {Load regexp code if regexp primitives are available.}