GNU bug report logs - #17830
24.4.50; smie: inners and up-list

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Sun, 22 Jun 2014 03:30:05 UTC

Severity: minor

Found in version 24.4.50

To reply to this bug, email your comments to 17830 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org:
bug#17830; Package emacs. (Sun, 22 Jun 2014 03:30:05 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Liu <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to monnier <at> iro.umontreal.ca, bug-gnu-emacs <at> gnu.org. (Sun, 22 Jun 2014 03:30:06 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.4.50; smie: inners and up-list
Date: Sun, 22 Jun 2014 11:28:25 +0800
I quite like the support for show-paren-mode in smie of 24.4 for
closers. But I often also want to be able to jump to the beginning of
the block with backward-up-list by key C-M-u.

However, if the block has inners such as `let ... in ... end' (sml-mode)
and point is between `in' and `end', backward-up-list always misses the
`let' opener. Some smie grammars take the `... in ...' out of the block
which makes backward-up-list work but show-paren-mode won't show `in' as
the inner matching `let' any more.

Any fix to this? Thanks.

Leo




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#17830; Package emacs. (Sun, 22 Jun 2014 12:44:01 GMT) Full text and rfc822 format available.

Message #8 received at 17830 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 17830 <at> debbugs.gnu.org
Subject: Re: bug#17830: 24.4.50; smie: inners and up-list
Date: Sun, 22 Jun 2014 08:43:05 -0400
> I quite like the support for show-paren-mode in smie of 24.4 for
> closers. But I often also want to be able to jump to the beginning of
> the block with backward-up-list by key C-M-u.

> However, if the block has inners such as `let ... in ... end' (sml-mode)
> and point is between `in' and `end', backward-up-list always misses the
> `let' opener. Some smie grammars take the `... in ...' out of the block
> which makes backward-up-list work but show-paren-mode won't show `in' as
> the inner matching `let' any more.

> Any fix to this? Thanks.

The use of forward-sexp-function in up-list is indeed problematic,
although it does work 90% of the time.

We probably need to introduce an up-list-function hook.  `transpose-sexp'
similarly fails in to do the right thing in some cases (tho for
transpose-sexp, the problem is not so much in the "jump over a sexp"
part as in the way it decides what to leave unchanged around point).


        Stefan




Severity set to 'minor' from 'normal' Request was from Stefan Kangas <stefan <at> marxist.se> to control <at> debbugs.gnu.org. (Wed, 29 Jun 2022 15:13:02 GMT) Full text and rfc822 format available.

This bug report was last modified 2 years and 349 days ago.

Previous Next


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