GNU bug report logs - #33487
[PATCH] bug of ruby-forward-sexp and ruby-backward-sexp

Previous Next

Package: emacs;

Reported by: Nobuyoshi Nakada <nobu <at> ruby-lang.org>

Date: Sat, 24 Nov 2018 16:24:02 UTC

Severity: normal

Tags: patch

Fixed in version 27.0

Done: Dmitry Gutov <dgutov <at> yandex.ru>

Bug is archived. No further changes may be made.

Full log


Message #10 received at 33487-done <at> debbugs.gnu.org (full text, mbox):

From: Dmitry Gutov <dgutov <at> yandex.ru>
To: Nobuyoshi Nakada <nobu <at> ruby-lang.org>, 33487-done <at> debbugs.gnu.org
Subject: Re: bug#33487: [PATCH] bug of ruby-forward-sexp and ruby-backward-sexp
Date: Tue, 11 Dec 2018 03:18:37 +0200
Version: 27.0

Hi Nobuyoshi,

On 24.11.2018 18:20, Nobuyoshi Nakada wrote:
> With lisp/progmodes/ruby-mode.el in Emacs 26.1, `ruby-forward-sexp' and 
> `ruby-backward-sexp' cannot work with block arguments which end without 
> argument name.
> 
> i.e.,
> 
>      proc do |a,|
> 
>      end
> 
> 
> or
> 
> 
>      proc do |a,*|
> 
>      end
> 
> 
> The reason is that `smie-default-forward-token' and 
> `smie-default-backward-token' just scan punctuation and the closing bar 
> together, and return ",|" or ",*|" in the above examples, then the 
> "opening-|" cannot find "matching closing-|".
> 
> The following patch trims the token and adjust the cursor position in 
> those cases.

Thank you for the patch. I've simplified it a little: regexps smaller, 
tests shorter, and removed a few of the latter (seemed redundant), and 
pushed.

Please let me know if there is anything amiss in the resulting patch: 
http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=3729a3f88fd7ce1d8a1a7f2ea61e8c4d05e954ab




This bug report was last modified 6 years and 167 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.