|
From: | Eric Abrahamsen |
Subject: | Re: Determining existence of text following point |
Date: | Mon, 17 May 2021 16:05:32 -0700 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux) |
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.
[Prev in Thread] | Current Thread | [Next in Thread] |