GNU bug report logs -
#10460
24.0.92; css-mode sexp movement
Previous Next
Reported by: Leo <sdl.web <at> gmail.com>
Date: Mon, 9 Jan 2012 01:44:01 UTC
Severity: normal
Found in version 24.0.92
Fixed in version 25.1
Done: Tom Tromey <tom <at> tromey.com>
Bug is archived. No further changes may be made.
Full log
Message #20 received at 10460 <at> debbugs.gnu.org (full text, mbox):
>> 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
This bug report was last modified 10 years and 145 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.