From: Tom Tromey <tom@tromey.com>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: Tom Tromey <tom@tromey.com>,
10460@debbugs.gnu.org, Leo <sdl.web@gmail.com>
Subject: bug#10460: 24.0.92; css-mode sexp movement
Date: Mon, 29 Dec 2014 09:35:50 -0700 [thread overview]
Message-ID: <877fxav2ft.fsf@tromey.com> (raw)
In-Reply-To: <jwvd272eci6.fsf-monnier+bug#10460@gnu.org> (Stefan Monnier's message of "Mon, 29 Dec 2014 09:50:58 -0500")
>> 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
next prev parent reply other threads:[~2014-12-29 16:35 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-09 1:40 bug#10460: 24.0.92; css-mode sexp movement Leo
2012-01-09 9:45 ` Deniz Dogan
2012-01-17 4:43 ` Leo
2014-12-29 3:53 ` Tom Tromey
2014-12-29 14:50 ` Stefan Monnier
2014-12-29 16:35 ` Tom Tromey [this message]
2014-12-29 19:13 ` Stefan Monnier
2014-12-29 19:20 ` Tom Tromey
2014-12-30 2:46 ` Stefan Monnier
2014-12-30 19:15 ` Tom Tromey
2014-12-30 23:03 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877fxav2ft.fsf@tromey.com \
--to=tom@tromey.com \
--cc=10460@debbugs.gnu.org \
--cc=monnier@iro.umontreal.ca \
--cc=sdl.web@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).