Is there a built-in boolean variable to determine if the cursor is at the end or the beginning of the line?
1 Answer
You want the functions bolp
and eolp
for beginning and end, respectively.
-
1
You want the functions bolp
and eolp
for beginning and end, respectively.
bolp
andeolp
serve that purpose, but they are specifically concerned withpoint
instead ofcursor
. In presence of invisible text, the cursor might look like it's at bol (beginning of line), but point might not be there. Do you care about such situations ?point
, and the answer of Dan is sufficient in my situation. If you know how to handle thecursor
I would be happy to learn it.bolp
. I don't know if there's a better/shorter way.