[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Guile-commits] 01/06: Fix check for rl_get_keymap
From: |
Ludovic Courtès |
Subject: |
[Guile-commits] 01/06: Fix check for rl_get_keymap |
Date: |
Wed, 12 Feb 2020 05:43:29 -0500 (EST) |
civodul pushed a commit to branch stable-2.2
in repository guile.
commit f361584a15358dc52ecb2981d4c47ab507c6a02a
Author: Daniel Llorens <address@hidden>
AuthorDate: Mon Jan 27 22:43:56 2020 +0100
Fix check for rl_get_keymap
This lets Guile build on OS X (tested on 10.14) with the system-provided
libreadline.
* acinclude.m4 (GUILE_READLINE): Check for rl_get_keymap_name instead of
rl_get_keymap. The system provided libreadline is an alias to libedit,
which has _keymap but not _keymap_name, and Guile uses both.
* guile-readline/readline.c: Adjust the include guard.
---
acinclude.m4 | 10 ++++++----
guile-readline/readline.c | 6 +++---
2 files changed, 9 insertions(+), 7 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 70cb247..3004f2f 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -427,10 +427,12 @@ AC_DEFUN([GUILE_READLINE], [
[[#include <stdio.h>]
[#include <readline/readline.h>]])
- dnl Check for rl_get_keymap. We only use this for deciding whether to
- dnl install paren matching on the Guile command line (when using
- dnl readline for input), so it's completely optional.
- AC_CHECK_FUNCS([rl_get_keymap])
+ dnl Check rl_get_keymap_name instead of rl_get_keymap because some
+ dnl systems only have the latter and the feature needs both.
+ dnl We only use this for deciding whether to install paren matching on
+ dnl the Guile command line (when using readline for input), so it's
+ dnl completely optional.
+ AC_CHECK_FUNCS([rl_get_keymap_name])
AC_CACHE_CHECK([for rl_getc_function pointer in readline],
ac_cv_var_rl_getc_function,
diff --git a/guile-readline/readline.c b/guile-readline/readline.c
index c15275d..b80b495 100644
--- a/guile-readline/readline.c
+++ b/guile-readline/readline.c
@@ -420,7 +420,7 @@ completion_function (char *text, int continuep)
}
}
-#if HAVE_RL_GET_KEYMAP
+#if HAVE_RL_GET_KEYMAP_NAME
/*Bouncing parenthesis (reimplemented by GH, 11/23/98, since readline is
strict gpl)*/
static int match_paren (int x, int k);
@@ -515,7 +515,7 @@ match_paren (int x, int k)
}
return 0;
}
-#endif /* HAVE_RL_GET_KEYMAP */
+#endif /* HAVE_RL_GET_KEYMAP_NAME */
#endif /* HAVE_RL_GETC_FUNCTION */
@@ -551,7 +551,7 @@ scm_init_readline ()
rl_variable_bind ("enable-bracketed-paste",
SCM_READLINE_BRACKETED_PASTE ? "on" : "off");
-#if HAVE_RL_GET_KEYMAP
+#if HAVE_RL_GET_KEYMAP_NAME
init_bouncing_parens();
#endif
scm_add_feature ("readline");
- [Guile-commits] branch stable-2.2 updated (9a11be1 -> 51a52cd), Ludovic Courtès, 2020/02/12
- [Guile-commits] 01/06: Fix check for rl_get_keymap,
Ludovic Courtès <=
- [Guile-commits] 03/06: texinfo: Properly render @acronym in plain text., Ludovic Courtès, 2020/02/12
- [Guile-commits] 04/06: Remove duplicate procedure in slot-allocation.scm., Ludovic Courtès, 2020/02/12
- [Guile-commits] 06/06: Fix build on platforms where the stack grows upwards., Ludovic Courtès, 2020/02/12
- [Guile-commits] 02/06: texinfo: Add '*line-width*' fluid to control line wrapping., Ludovic Courtès, 2020/02/12
- [Guile-commits] 05/06: Handle GMP allocations through libgc and remove bignum finalizers., Ludovic Courtès, 2020/02/12