1 |
;;;; readline.scm --- support functions for command-line editing |
;;;; readline.scm --- support functions for command-line editing |
2 |
;;;; |
;;;; |
3 |
;;;; Copyright (C) 1997, 1999, 2000, 2001 Free Software Foundation, Inc. |
;;;; Copyright (C) 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. |
4 |
;;;; |
;;;; |
5 |
;;;; This program is free software; you can redistribute it and/or modify |
;;;; This program is free software; you can redistribute it and/or modify |
6 |
;;;; it under the terms of the GNU General Public License as published by |
;;;; it under the terms of the GNU General Public License as published by |
199 |
|
|
200 |
(define-public (activate-readline) |
(define-public (activate-readline) |
201 |
(if (and (isatty? (current-input-port)) |
(if (and (isatty? (current-input-port)) |
202 |
(not (and (module-defined? the-root-module 'use-emacs-interface) |
(not (let ((guile-user-module (resolve-module '(guile-user)))) |
203 |
(module-ref the-root-module 'use-emacs-interface)))) |
(and (module-defined? guile-user-module 'use-emacs-interface) |
204 |
|
(module-ref guile-user-module 'use-emacs-interface))))) |
205 |
(let ((read-hook (lambda () (run-hook before-read-hook)))) |
(let ((read-hook (lambda () (run-hook before-read-hook)))) |
206 |
(set-current-input-port (readline-port)) |
(set-current-input-port (readline-port)) |
207 |
(set! repl-reader |
(set! repl-reader |