You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Emacs' own forward-sexp does not jump out of balanced expressions. Instead, it signals a scan-error. This behaviour is used by functions like up-list to determine the end of the expression. haskell-forward-sexp, on the other hand, jumps out of the expression without error. While this behaviour is probably more intuitive from the user perspective, it breaks at least one other useful navigation function.
I assume that implementing the proper behaviour for arbitrary Haskell expressions would be way to complex, but maybe it would be possible to simply signal an error when looking at a closing paren/bracket/brace, thus retaining the most common use-case for up-list, i.e. jumping out of sexp-like lists. Another option might be to just rebind forward-sexp instead of setting forward-sexp-function to a function that does not behave properly.
The text was updated successfully, but these errors were encountered:
gracjan
changed the title
haskell-forward-sexp as forward-sexp-function breaks up-list
haskell-forward-sexp should signal scan-error at the end of list like forward-sexp
Feb 11, 2016
Emacs' own
forward-sexp
does not jump out of balanced expressions. Instead, it signals ascan-error
. This behaviour is used by functions likeup-list
to determine the end of the expression.haskell-forward-sexp
, on the other hand, jumps out of the expression without error. While this behaviour is probably more intuitive from the user perspective, it breaks at least one other useful navigation function.I assume that implementing the proper behaviour for arbitrary Haskell expressions would be way to complex, but maybe it would be possible to simply signal an error when looking at a closing paren/bracket/brace, thus retaining the most common use-case for
up-list
, i.e. jumping out of sexp-like lists. Another option might be to just rebindforward-sexp
instead of settingforward-sexp-function
to a function that does not behave properly.The text was updated successfully, but these errors were encountered: