[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master f117b5df4d: Add new functions eol and bol
From: |
Lars Ingebrigtsen |
Subject: |
Re: master f117b5df4d: Add new functions eol and bol |
Date: |
Fri, 19 Aug 2022 23:49:07 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/29.0.50 (gnu/linux) |
Stefan Kangas <stefankangas@gmail.com> writes:
> We could make the task less daunting by starting with something like:
[...]
> +(defalias 'point-at-eol #'line-end-position
> + "Obsolete; use `point-eol' or `line-end-position' instead.")
Yes, I guess. We could also just rename all the calls to point-at-eol
to line-end-position (etc) and obsolete the names for real.
It's some churn, but... And then someone could audit all these calls at
leisure, if they want to.
By the way, I wasn't quite aware of how DWIM-ey the `end-of-line'
function is. It also does the field stuff, but then:
while (1)
{
newpos = XFIXNUM (Fline_end_position (n));
SET_PT (newpos);
if (PT > newpos
&& FETCH_BYTE (PT_BYTE - 1) == '\n')
{
/* If we skipped over a newline that follows
an invisible intangible run,
move back to the last tangible position
within the line. */
SET_PT (PT - 1);
break;
}
else if (PT > newpos && PT < ZV
&& FETCH_BYTE (PT_BYTE) != '\n')
/* If we skipped something intangible
and now we're not really at eol,
keep going. */
n = make_fixnum (1);
else
break;
}
Now, the `C-e' command (`move-end-of-line') is another layer of
DWIM-ness on top of this...
I guess these things have evolved over time.
- Re: master f117b5df4d: Add new functions eol and bol, (continued)
Re: master f117b5df4d: Add new functions eol and bol, Lars Ingebrigtsen, 2022/08/19
- Re: master f117b5df4d: Add new functions eol and bol, Stefan Kangas, 2022/08/19
- Re: master f117b5df4d: Add new functions eol and bol,
Lars Ingebrigtsen <=
- Re: master f117b5df4d: Add new functions eol and bol, Eli Zaretskii, 2022/08/20
- Re: master f117b5df4d: Add new functions eol and bol, Stefan Monnier, 2022/08/20
- Re: master f117b5df4d: Add new functions eol and bol, Stefan Kangas, 2022/08/21
- Re: master f117b5df4d: Add new functions eol and bol, Lars Ingebrigtsen, 2022/08/22
- Re: master f117b5df4d: Add new functions eol and bol, Stefan Kangas, 2022/08/22
- Re: master f117b5df4d: Add new functions eol and bol, Po Lu, 2022/08/22
- Re: master f117b5df4d: Add new functions eol and bol, Stefan Monnier, 2022/08/23
- Re: master f117b5df4d: Add new functions eol and bol, Richard Stallman, 2022/08/23
- Re: master f117b5df4d: Add new functions eol and bol, Po Lu, 2022/08/24
- Re: master f117b5df4d: Add new functions eol and bol, Stefan Monnier, 2022/08/24