2015-06-08 19:55 GMT+01:00 Andreas Röhler <address@hidden>:
Am 08.06.2015 um 18:09 schrieb Artur Malabarba:
2015-06-08 15:24 GMT+01:00 Andreas Röhler <address@hidden>:
When inside a string, mark-sexp should mark the string. IMO doesn't make
sense to consider the contents then.
Example, cursor at beginning of docstring at "Just"
(defun foo1 ()
"Just foo")
M-x mark-sexp RET marks word "Just", not the string.
Respectivly forward-sexp should reach the end of string, if called
inside.
That would make it redundant with `up-list'.
Don't think so:
I didn't mean the two commands are completely identical. I meant that
the action of moving out of a string while inside a string is already
achieved by the `up-list' command (which is also generally useful but
has no binding), so changing `forward-sexp' to do that as well would
be redundant. Specially since you'd be removing `forward-sexp's
ability to move inside a string, which is useful.
(list "asdfsdf adfsadf " "asdfsd asd asdf " "asdfasf asdfsad ")
When started a "list", forward-sexp travels string by string, which is ok
and also means, it recognises a string as sexp already.
Accordingly from inside a string, it should go to the end first.
You seem to think this would make forward-sexp more consistent, but it
would make it less consistent. Currently, a pair of parentheses
delineates a sexp in the same way that a pair of double quotes does.
If you place point at the "a" on the following two examples,
`forward-sexp' will do the exact same thing in both cases. That's
consistent.
(abc def)
"abc def"