mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +02:00
guile-readline slight modernization
* guile-readline/Makefile.am: Update to use am/guilec. * guile-readline/ice-9/readline.scm (activate-readline): Update to use a lambda*.
This commit is contained in:
parent
78e836efff
commit
62651cb317
2 changed files with 12 additions and 13 deletions
|
@ -20,17 +20,18 @@
|
||||||
## Floor, Boston, MA 02110-1301 USA
|
## Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
include $(top_srcdir)/am/snarf
|
include $(top_srcdir)/am/snarf
|
||||||
|
include $(top_srcdir)/am/guilec
|
||||||
|
|
||||||
## Prevent automake from adding extra -I options
|
## Prevent automake from adding extra -I options
|
||||||
DEFS = @DEFS@ @EXTRA_DEFS@
|
DEFS = @DEFS@ @EXTRA_DEFS@
|
||||||
|
|
||||||
|
# We're at the root of the module hierarchy.
|
||||||
|
modpath =
|
||||||
|
SOURCES =
|
||||||
|
|
||||||
if HAVE_READLINE
|
if HAVE_READLINE
|
||||||
|
|
||||||
# `ice-9' subdirectory.
|
SOURCES += ice-9/readline.scm
|
||||||
ice9dir = $(pkgdatadir)/$(GUILE_EFFECTIVE_VERSION)
|
|
||||||
nobase_ice9_DATA = ice-9/readline.scm
|
|
||||||
EXTRA_DIST = $(nobase_ice9_DATA)
|
|
||||||
|
|
||||||
|
|
||||||
## Check for headers in $(srcdir)/.., so that #include
|
## Check for headers in $(srcdir)/.., so that #include
|
||||||
## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
|
## <libguile/MUMBLE.h> will find MUMBLE.h in this dir when we're
|
||||||
|
@ -58,17 +59,16 @@ modincludedir = $(pkgincludedir)/$(GUILE_EFFECTIVE_VERSION)
|
||||||
modinclude_HEADERS = readline.h
|
modinclude_HEADERS = readline.h
|
||||||
|
|
||||||
snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
|
snarfcppopts = $(DEFS) $(AM_CPPFLAGS) $(CPPFLAGS) $(CFLAGS)
|
||||||
SUFFIXES = .x
|
SUFFIXES += .x
|
||||||
.c.x:
|
.c.x:
|
||||||
$(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
|
$(AM_V_SNARF)$(GUILE_SNARF) -o $@ $< $(snarfcppopts)
|
||||||
|
|
||||||
EXTRA_DIST += LIBGUILEREADLINE-VERSION ChangeLog-2008
|
EXTRA_DIST += LIBGUILEREADLINE-VERSION ChangeLog-2008
|
||||||
|
|
||||||
ETAGS_ARGS = \
|
ETAGS_ARGS += \
|
||||||
$(nobase_ice9_DATA) \
|
|
||||||
$(libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_SOURCES)
|
$(libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_SOURCES)
|
||||||
|
|
||||||
CLEANFILES = *.x
|
CLEANFILES += *.x
|
||||||
|
|
||||||
endif HAVE_READLINE
|
endif HAVE_READLINE
|
||||||
|
|
||||||
|
|
|
@ -205,7 +205,8 @@
|
||||||
(let ((repl-read-hook (lambda () (run-hook before-read-hook))))
|
(let ((repl-read-hook (lambda () (run-hook before-read-hook))))
|
||||||
(set-current-input-port (readline-port))
|
(set-current-input-port (readline-port))
|
||||||
(set! repl-reader
|
(set! repl-reader
|
||||||
(lambda (repl-prompt . reader)
|
(lambda* (repl-prompt
|
||||||
|
#:optional (reader (fluid-ref current-reader)))
|
||||||
(let ((outer-new-input-prompt new-input-prompt)
|
(let ((outer-new-input-prompt new-input-prompt)
|
||||||
(outer-continuation-prompt continuation-prompt)
|
(outer-continuation-prompt continuation-prompt)
|
||||||
(outer-read-hook read-hook))
|
(outer-read-hook read-hook))
|
||||||
|
@ -214,9 +215,7 @@
|
||||||
(set-buffered-input-continuation?! (readline-port) #f)
|
(set-buffered-input-continuation?! (readline-port) #f)
|
||||||
(set-readline-prompt! repl-prompt "... ")
|
(set-readline-prompt! repl-prompt "... ")
|
||||||
(set-readline-read-hook! repl-read-hook))
|
(set-readline-read-hook! repl-read-hook))
|
||||||
(lambda () ((or (and (pair? reader) (car reader))
|
(lambda () ((or reader read) (current-input-port)))
|
||||||
(fluid-ref current-reader)
|
|
||||||
read)))
|
|
||||||
(lambda ()
|
(lambda ()
|
||||||
(set-readline-prompt! outer-new-input-prompt outer-continuation-prompt)
|
(set-readline-prompt! outer-new-input-prompt outer-continuation-prompt)
|
||||||
(set-readline-read-hook! outer-read-hook))))))
|
(set-readline-read-hook! outer-read-hook))))))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue