bug#45339: Readline filename completion

lloda <[email protected]>
Newsgroups gmane.lisp.guile.bugs
Message-ID <[email protected]>
Applied in f3a23edf9ed111caab7bbad583874ad34ff8652d. Thanks!


> On 19 May 2021, at 17:24, "" <[email protected]> <[email protected]> wrote:
> 
> Since my patch didn't follow GNU C style here's an update.
> Sorry guys!
>
Fixed-style-for-02439a124.patch (text/x-patch, 1.2 KB)
From 0a62b75813cd8a94b87284395ee8d97e16069bb0 Mon Sep 17 00:00:00 2001
From: jakub-w <[email protected]>
Date: Wed, 19 May 2021 17:14:35 +0200
Subject: [PATCH] Fixed style for 02439a124

* guile-readline/readline.c (scm_filename_completion_function)
---
 guile-readline/readline.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/guile-readline/readline.c b/guile-readline/readline.c
index 7bb2394ba..469d6ec7d 100644
--- a/guile-readline/readline.c
+++ b/guile-readline/readline.c
@@ -379,7 +379,6 @@ SCM_DEFINE (scm_filename_completion_function, "filename-completion-function", 2,
 #define FUNC_NAME s_scm_filename_completion_function
 {
   char *s;
-  SCM ans;
   char *c_text = scm_to_locale_string (text);
 #ifdef HAVE_RL_FILENAME_COMPLETION_FUNCTION
   s = rl_filename_completion_function (c_text, scm_is_true (continuep));
@@ -387,11 +386,10 @@ SCM_DEFINE (scm_filename_completion_function, "filename-completion-function", 2,
   s = filename_completion_function (c_text, scm_is_true (continuep));
 #endif
   free (c_text);
-  if (!s) {
+  if (!s)
     return SCM_BOOL_F;
-  }
-  ans = scm_take_locale_string (s);
-  return ans;
+
+  return scm_take_locale_string (s);
 }
 #undef FUNC_NAME
 
-- 
2.31.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.