> Calling `up-list' inside a string gives this error:
> up-list: Scan error: "Unbalanced parentheses", 14, 19

Actually, it can give all kinds of different errors as well as
desriable behaviors.

> This is obviously not the case in this example:

> (setq foo "bar")
>             ^ point

> I can't tell if the failure to move out of the parentheses is by design,
> but the error message is misleading.

The problem here is how to figure out that we start from inside a string.
One of the design constraints we've imposed on ourselves is that operations
like up-list and friends should ideally work "locally" without having to
parse the buffer from the very beginning, whereas to reliably know that
we're outside of a string we have no other choice than to parse from the
very beginning.

Now you're going to say "but it's highlighted as a string, so Emacs knows
it's a string".  Well, yes, kind of.  But now users have found advantages to
the misfeature, and font-lock highlighting is not guaranteed to be
available and even less guaranteed to be correct, and ....

So let's call it a known misfeature.  It should be improved in the future.


        Stefan


_______________________________________________
emacs-pretest-bug mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug

Reply via email to