[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: doc strings of variable-at-point and find-variable
From: |
martin rudalics |
Subject: |
Re: doc strings of variable-at-point and find-variable |
Date: |
Sat, 09 Dec 2006 10:44:11 +0100 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> These doc strings don't describe the position of the variable well:
> The variable-at-point doc string mentions nothing about using a
> variable near point - it says only "around point", which suggests that
> only a variable at point is used. The find-variable doc string
> mentions using a variable near point, but this suggests that the
> nearest variable will be used, which is not always the case.
>
> The actual variable used seems to be the one before or at point, even
> if there is a closer one after point. I didn't check all cases, but
> perhaps it would be more correct to say at or before point for both
> doc strings. Perhaps something also needs to be said about the
> possible distance before point.
The "at-point" fuzziness is hard to explain. It's simple when `point'
is immediately before, after, or within the print name of a variable.
Otherwise, "at-point" refers to the last sexp in the buffer preceding
`point'. Finding that may depend on whether `point' is in a string or
comment, the (buffer-local?) values of `parse-sexp-ignore-comments',
`parse-sexp-lookup-properties', `syntax-table' text properties, ...