[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10460: 24.0.92; css-mode sexp movement
From: |
Tom Tromey |
Subject: |
bug#10460: 24.0.92; css-mode sexp movement |
Date: |
Mon, 29 Dec 2014 09:35:50 -0700 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
>> When I do this, point moves to the "a".
Stefan> It skipped a "statement".
>> This seems clearly wrong to me
>> -- I think point should be left at the "{".
Stefan> Why?
I was going just by how I "know" emacs works, based on using various
other modes for years and years. That is, consistency with C mode, js
mode, tcl mode, etc.
The docs also indicate that this is how Emacs works.
>From "(emacs) Expressions":
Each programming language mode has its own definition of a "balanced
expression". Balanced expressions typically include individual symbols,
numbers, and string constants, as well as pieces of code enclosed in a
matching pair of delimiters.
[...]
To move forward over a balanced expression, use ‘C-M-f’
(‘forward-sexp’). If the first significant character after point is an
opening delimiter (e.g., ‘(’, ‘[’ or ‘{’ in C), this command moves past
the matching closing delimiter. If the character begins a symbol,
string, or number, the command moves over that.
[...]
The command ‘C-M-b’ (‘backward-sexp’) moves backward over a balanced
expression—like ‘C-M-f’, but in the reverse direction. If the
expression is preceded by any prefix characters (single-quote, backquote
and comma, in Lisp), the command moves back over them as well.
I suppose this supplies a bit of wiggle room, if you leniently interpret
"prefix characters".
That said it just seems weird to me that, when point is on "{", if
forward-sexp followed by backward-sexp moves to a different spot,
especially given the above documentation.
Tom
- bug#10460: 24.0.92; css-mode sexp movement, Tom Tromey, 2014/12/28
- bug#10460: 24.0.92; css-mode sexp movement, Stefan Monnier, 2014/12/29
- bug#10460: 24.0.92; css-mode sexp movement,
Tom Tromey <=
- bug#10460: 24.0.92; css-mode sexp movement, Stefan Monnier, 2014/12/29
- bug#10460: 24.0.92; css-mode sexp movement, Tom Tromey, 2014/12/29
- bug#10460: 24.0.92; css-mode sexp movement, Stefan Monnier, 2014/12/29
- bug#10460: 24.0.92; css-mode sexp movement, Tom Tromey, 2014/12/30
- bug#10460: 24.0.92; css-mode sexp movement, Stefan Monnier, 2014/12/30