all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#17830: 24.4.50; smie: inners and up-list
@ 2014-06-22  3:28 Leo Liu
  2014-06-22 12:43 ` Stefan Monnier
  0 siblings, 1 reply; 2+ messages in thread
From: Leo Liu @ 2014-06-22  3:28 UTC (permalink / raw)
  To: 17830


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





^ permalink raw reply	[flat|nested] 2+ messages in thread

* bug#17830: 24.4.50; smie: inners and up-list
  2014-06-22  3:28 bug#17830: 24.4.50; smie: inners and up-list Leo Liu
@ 2014-06-22 12:43 ` Stefan Monnier
  0 siblings, 0 replies; 2+ messages in thread
From: Stefan Monnier @ 2014-06-22 12:43 UTC (permalink / raw)
  To: Leo Liu; +Cc: 17830

> 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





^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-06-22 12:43 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-06-22  3:28 bug#17830: 24.4.50; smie: inners and up-list Leo Liu
2014-06-22 12:43 ` Stefan Monnier

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.