emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: thing-at-point's meaning of current sexp vs. up-list's: which is cor


From: Stefan Monnier
Subject: Re: thing-at-point's meaning of current sexp vs. up-list's: which is correct?
Date: Thu, 13 Jun 2013 10:13:04 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (gnu/linux)

> forward-sexp and er/expand-region agree with up-list's meaning, and it does
> look like the right meaning. If thing-at-point is ad-hoc DWIM anyway, then
> I don't see the advantage of it using a different meaning than the standard
> for other functions.

Because thing-at-point is dwimish: if you're right before a closing
paren (and hence you block cursor is drawn on top of the closing paren),
it's pretty clear that by "the sexp at point" you want to mean "the sexp
that ends with the paren after point".

> And kill-backward-up-list's implementation is short and elegant; dealing
> with thing-at-point's different meaning would make it longer and ugly.

DWIM basically means that it only makes sense for the user to call it,
but not for Elisp code, because the dwimness tries to guess what a user
would want, but what a piece of code would want is generally
very different.


        Stefan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]