clojure-emacs / clojure-emacs/clojure-ts-mode
Navigation commands should no-op when called in an invalid position
- Dominant language
- Emacs Lisp
- Stars
- 188
- Forks
- 21
- Avg merge
- 12m
- Merged PRs (30d)
- 1
Description
In regular `clojure-mode`, calling the commands `up-list` and `backward-up-list` in a position without an enclosing form results in a no-op, raising a user error
> At top level
E.g. with point at `:here` in the following, press `C-M-u` (backward-up-list) / `M-x up-list` repeatedly to move out of successive forms.
```clj
(first "expression")
(:you {:are [:here]})
(last "expression")
```
Upon reaching the top level (beginning/end of line), the expected behavior is for the point to remain stationary (and a user error to be thrown)
In `clojure-ts-mode`, this results instead in the point moving all the way to the beginning or end of the buffer, which can be quite disconcerting.
Additional note: This affects various navigation commands in other packages like Paredit and Lispy, which ultimately delegate to (backward)-up-list.
Contributor guide
Assessment
This issue has not been assessed yet.