bug-guile
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#32501: Bouncing parentheses broken in REPL with vi-mode enabled


From: Mark H Weaver
Subject: bug#32501: Bouncing parentheses broken in REPL with vi-mode enabled
Date: Wed, 22 Aug 2018 22:42:15 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Daniel,

Daniel Tam <address@hidden> writes:

> I've activated readline support for the Guile repl, but I've found that
> if my inputrc enables vi-mode, then the bouncing parentheses feature
> doesn't work. Disabling vi-mode does the trick.

Indeed.  For some reason that I cannot determine, the bouncing
parentheses feature is specifically disabled when the vi keymap is in
use.  The relevant function is 'init_bouncing_parens' in
guile-readline/readline.c:

  static void
  init_bouncing_parens ()
  {
    if (strncmp (rl_get_keymap_name (rl_get_keymap ()), "vi", 2))
      {
        rl_bind_key (')', match_paren);
        rl_bind_key (']', match_paren);
        rl_bind_key ('}', match_paren);
      }
  }

This is ancient code, predating version control, present in the original
import into CVS in 1999.

I looked at the source code of readline-7.0, and IIUC none of those keys
have mappings in the default vi keymap.

The right fix might be to simply remove the 'if' check above.  Would you
like to try it and report back?

      Thanks,
        Mark





reply via email to

[Prev in Thread] Current Thread [Next in Thread]