[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: |
Kelly Dean |
Subject: |
Re: thing-at-point's meaning of current sexp vs. up-list's: which is correct? |
Date: |
Wed, 12 Jun 2013 18:36:23 -0700 (PDT) |
Stefan Monnier wrote:
>I think the bug is in kill-backward-up-list. `up-list' is definitely
>behaving correctly here, and thing-at-point is basically free to return
>anything it feels like (it's a very ad-hoc function which tries to
>DWIM).
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. Wouldn't it be better to change thing-at-point? Besides this,
in trunk, thing-at-point returns nil in the case I described, even though there
certainly is a sexp at point, so that bug might as well be fixed in a way that
makes thing-at-point compatible with the other functions.
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.