(use-syntax): Do not set scm:eval-transformer when
[bpt/guile.git] / guile-readline / readline.c
index 068c453..35c332f 100644 (file)
@@ -360,6 +360,16 @@ SCM_DEFINE (scm_write_history, "write-history", 1, 0, 0,
 }
 #undef FUNC_NAME
 
+SCM_DEFINE (scm_clear_history, "clear-history", 0, 0, 0, 
+            (),
+           "Clear the history buffer of the readline machinery.")
+#define FUNC_NAME s_scm_clear_history
+{
+  clear_history();
+  return SCM_UNSPECIFIED;
+}
+#undef FUNC_NAME
+
 
 SCM_DEFINE (scm_filename_completion_function, "filename-completion-function", 2, 0, 0, 
             (SCM text, SCM continuep),
@@ -387,7 +397,7 @@ SCM scm_readline_completion_function_var;
 static char *
 completion_function (char *text, int continuep)
 {
-  SCM compfunc = SCM_CDR (scm_readline_completion_function_var);
+  SCM compfunc = SCM_VARIABLE_REF (scm_readline_completion_function_var);
   SCM res;
 
   if (SCM_FALSEP (compfunc))
@@ -532,7 +542,7 @@ scm_init_readline ()
 #ifdef HAVE_RL_GETC_FUNCTION
 #include "guile-readline/readline.x"
   scm_readline_completion_function_var
-    = scm_sysintern ("*readline-completion-function*", SCM_BOOL_F);
+    = scm_c_define ("*readline-completion-function*", SCM_BOOL_F);
   rl_getc_function = current_input_getc;
   rl_redisplay_function = redisplay;
   rl_completion_entry_function = (Function*) completion_function;