help-gnu-emacs
[Top][All Lists]
Advanced

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

Re: Determining existence of text following point


From: michael-franzese
Subject: Re: Determining existence of text following point
Date: Tue, 18 May 2021 01:15:09 +0200

But if there are only empty spaces it is ok too.

> Sent: Tuesday, May 18, 2021 at 11:05 AM
> From: "Eric Abrahamsen" <eric@ericabrahamsen.net>
> To: michael-franzese@gmx.com
> Cc: "Skip Montanaro" <skip.montanaro@gmail.com>, "Help Gnu Emacs" 
> <help-gnu-emacs@gnu.org>
> Subject: Re: Determining existence of text following point
>
> michael-franzese@gmx.com writes:
> 
> >    Would like to delete and insert a string "s" only if there is no text
> >    folloming point.
> >
> >    (delete-region (point) (line-end-position))
> >    (save-excursion (insert s))
> 
> There's a function for this: `eolp'
> 
> Return t if point is at the end of a line.
> ‘End of a line’ includes point being at the end of the buffer.
>



reply via email to

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