-;;;; Copyright (C) 1996, 1997, 1998, 1999 Free Software Foundation, Inc.
+;;;; Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
;;;;
;;;; This program is free software; you can redistribute it and/or modify
;;;; it under the terms of the GNU General Public License as published by
;;;; the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
;;;; Boston, MA 02111-1307 USA
;;;;
+;;;; As a special exception, the Free Software Foundation gives permission
+;;;; for additional uses of the text contained in its release of GUILE.
+;;;;
+;;;; The exception is that, if you link the GUILE library with other files
+;;;; to produce an executable, this does not by itself cause the
+;;;; resulting executable to be covered by the GNU General Public License.
+;;;; Your use of that executable is in no way restricted on account of
+;;;; linking the GUILE library code into it.
+;;;;
+;;;; This exception does not however invalidate any other reasons why
+;;;; the executable file might be covered by the GNU General Public License.
+;;;;
+;;;; This exception applies only to the code released by the
+;;;; Free Software Foundation under the name GUILE. If you copy
+;;;; code from other Free Software Foundation releases into a copy of
+;;;; GUILE, as the General Public License permits, the exception does
+;;;; not apply to the code that you add in this way. To avoid misleading
+;;;; anyone as to the status of such modified files, you must delete
+;;;; this exception notice from them.
+;;;;
+;;;; If you write modifications of your own for GUILE, it is your choice
+;;;; whether to permit this exception to apply to your modifications.
+;;;; If you do not wish that, delete this exception notice.
+;;;;
;;;; The author can be reached at djurfeldt@nada.kth.se
;;;; Mikael Djurfeldt, SANS/NADA KTH, 10044 STOCKHOLM, SWEDEN
;;;; (I didn't write this!)
(lambda ()
(let loop ((c (read-char port)))
(cond ((eq? c the-eof-object)
- (error "End of file while recieving Emacs data"))
+ (error "End of file while receiving Emacs data"))
((memq c whitespace-chars) (loop (read-char port)))
((eq? c #\;) (flush-line port) (loop (read-char port)))
(else (unread-char c port))))
(apply throw key args))))))
(define (emacs-eval-request form)
- (result-to-emacs (eval form)))
+ (result-to-emacs (eval form (interaction-environment))))
;;*fixme* Not necessary to use flags no-stack and no-source
(define (get-frame-source frame)
(define (emacs-symdoc symbol)
(if (or (not (module-bound? (current-module) symbol))
- (not (procedure? (eval symbol))))
+ (not (procedure? (eval symbol (interaction-environment)))))
'nil
- (procedure-documentation (eval symbol))))
+ (procedure-documentation (eval symbol (interaction-environment)))))
;;; A fix to get the emacs interface to work together with the module system.
;;;
-(variable-set! (builtin-variable '%%load-port) load-port)
-(variable-set! (builtin-variable '%%emacs-load) emacs-load)
-(variable-set! (builtin-variable '%%emacs-eval-request) emacs-eval-request)
-(variable-set! (builtin-variable '%%emacs-select-frame) emacs-select-frame)
-(variable-set! (builtin-variable '%%emacs-frame-eval) emacs-frame-eval)
-(variable-set! (builtin-variable '%%emacs-symdoc) emacs-symdoc)
-(variable-set! (builtin-variable '%%apropos-internal) apropos-internal)
-
-;;; Set backtrace width to 60
-
-(debug-set! width 60)
+(for-each (lambda (name value)
+ (module-define! the-root-module name value))
+ '(%%load-port
+ %%emacs-load
+ %%emacs-eval-request
+ %%emacs-select-frame
+ %%emacs-frame-eval
+ %%emacs-symdoc
+ %%apropos-internal)
+ (list load-port
+ emacs-load
+ emacs-eval-request
+ emacs-select-frame
+ emacs-frame-eval
+ emacs-symdoc
+ apropos-internal))