]> granicus.if.org Git - python/commitdiff
Merged revisions 75531,75725 via svnmerge from
authorAntoine Pitrou <solipsis@pitrou.net>
Tue, 27 Oct 2009 12:30:12 +0000 (12:30 +0000)
committerAntoine Pitrou <solipsis@pitrou.net>
Tue, 27 Oct 2009 12:30:12 +0000 (12:30 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75531 | antoine.pitrou | 2009-10-19 20:17:18 +0200 (lun., 19 oct. 2009) | 4 lines

  Issue #5833: Fix extra space character in readline completion with the
  GNU readline library version 6.0.
........
  r75725 | antoine.pitrou | 2009-10-26 20:16:46 +0100 (lun., 26 oct. 2009) | 4 lines

  Some platforms have rl_completion_append_character but not rl_completion_suppress_append.
  Reported by Mark D.
........

Modules/readline.c
configure
configure.in
pyconfig.h.in

index f5a54bc08f6964fe49c96e5328be5535dc2ddf51..bff1dcb874addf41659694cd18b22a1681227777 100644 (file)
@@ -759,6 +759,12 @@ on_completion(const char *text, int state)
 static char **
 flex_complete(char *text, int start, int end)
 {
+#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
+       rl_completion_append_character ='\0';
+#endif
+#ifdef HAVE_RL_COMPLETION_SUPPRESS_APPEND
+       rl_completion_suppress_append = 0;
+#endif
        Py_XDECREF(begidx);
        Py_XDECREF(endidx);
        begidx = PyInt_FromLong((long) start);
@@ -801,9 +807,6 @@ setup_readline(void)
        rl_completer_word_break_characters =
                strdup(" \t\n`~!@#$%^&*()-=+[{]}\\|;:'\",<>/?");
                /* All nonalphanums except '.' */
-#ifdef HAVE_RL_COMPLETION_APPEND_CHARACTER
-       rl_completion_append_character ='\0';
-#endif
 
        begidx = PyInt_FromLong(0L);
        endidx = PyInt_FromLong(0L);
index 348cd9166a24e38a0e0b3ef42aa4c2816626d422..07b7cbddb17abde181e3147700a68522d1a532b9 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,5 +1,5 @@
 #! /bin/sh
-# From configure.in Revision: 74982 .
+# From configure.in Revision: 75132 .
 # Guess values for system-dependent variables and create Makefiles.
 # Generated by GNU Autoconf 2.61 for python 2.6.
 #
@@ -3855,7 +3855,7 @@ else
   { echo "$as_me:$LINENO: result: no" >&5
 echo "${ECHO_T}no" >&6; }
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 
 
@@ -5394,7 +5394,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 else
   ac_cv_header_stdc=no
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 fi
 
@@ -5415,7 +5415,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 else
   ac_cv_header_stdc=no
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 fi
 
@@ -6513,7 +6513,7 @@ _ACEOF
 
 
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 { echo "$as_me:$LINENO: result: $was_it_defined" >&5
 echo "${ECHO_T}$was_it_defined" >&6; }
@@ -7043,7 +7043,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 else
   ac_cv_type_uid_t=no
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 fi
 { echo "$as_me:$LINENO: result: $ac_cv_type_uid_t" >&5
@@ -14163,7 +14163,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
 else
   unistd_defines_pthreads=no
 fi
-rm -f -r conftest*
+rm -f conftest*
 
     { echo "$as_me:$LINENO: result: $unistd_defines_pthreads" >&5
 echo "${ECHO_T}$unistd_defines_pthreads" >&6; }
@@ -15777,7 +15777,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   $EGREP "yes" >/dev/null 2>&1; then
   ipv6type=$i
 fi
-rm -f -r conftest*
+rm -f conftest*
 
                        ;;
                kame)
@@ -15800,7 +15800,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
                                ipv6libdir=/usr/local/v6/lib
                                ipv6trylibc=yes
 fi
-rm -f -r conftest*
+rm -f conftest*
 
                        ;;
                linux-glibc)
@@ -15821,7 +15821,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
   ipv6type=$i;
                                ipv6trylibc=yes
 fi
-rm -f -r conftest*
+rm -f conftest*
 
                        ;;
                linux-inet6)
@@ -15859,7 +15859,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
                                ipv6lib=inet6;
                                ipv6libdir=/usr/local/v6/lib
 fi
-rm -f -r conftest*
+rm -f conftest*
 
                        ;;
                v6d)
@@ -15882,7 +15882,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
                                ipv6libdir=/usr/local/v6/lib;
                                BASECFLAGS="-I/usr/local/v6/include $BASECFLAGS"
 fi
-rm -f -r conftest*
+rm -f conftest*
 
                        ;;
                zeta)
@@ -15904,7 +15904,7 @@ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
                                ipv6lib=inet6;
                                ipv6libdir=/usr/local/v6/lib
 fi
-rm -f -r conftest*
+rm -f conftest*
 
                        ;;
                esac
@@ -23497,7 +23497,26 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
-rm -f -r conftest*
+rm -f conftest*
+
+  cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <readline/readline.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "extern int rl_completion_suppress_append;" >/dev/null 2>&1; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_RL_COMPLETION_SUPPRESS_APPEND 1
+_ACEOF
+
+fi
+rm -f conftest*
 
 fi
 
@@ -23767,7 +23786,7 @@ cat >>confdefs.h <<\_ACEOF
 _ACEOF
 
 fi
-rm -f -r conftest*
+rm -f conftest*
 
 fi
 
index cec970547e945ffdd400b8eeb7bdfa21a5621c6c..fa43374c43efd2540f36cb2a47077bbc611a62fc 100644 (file)
@@ -3499,6 +3499,10 @@ then
   [readline/readline.h],
   AC_DEFINE(HAVE_RL_COMPLETION_APPEND_CHARACTER, 1,
   [Define if you have readline 2.2]), )
+  AC_EGREP_HEADER([extern int rl_completion_suppress_append;],
+  [readline/readline.h],
+  AC_DEFINE(HAVE_RL_COMPLETION_SUPPRESS_APPEND, 1,
+  [Define if you have rl_completion_suppress_append]), )
 fi
 
 # check for readline 4.0
index 82285bd36ada17f47424c25c977c8d1abaac68f5..e05ab4a8eb0d6c65df111495617023e3a9d52110 100644 (file)
 /* Define if you have readline 4.2 */
 #undef HAVE_RL_COMPLETION_MATCHES
 
+/* Define if you have rl_completion_suppress_append */
+#undef HAVE_RL_COMPLETION_SUPPRESS_APPEND
+
 /* Define if you have readline 4.0 */
 #undef HAVE_RL_PRE_INPUT_HOOK