|
From: | Jean Louis |
Subject: | Re: Determining existence of text following point |
Date: | Tue, 18 May 2021 11:47:04 +0300 |
User-agent: | Mutt/2.0.6 (2021-03-06) |
* michael-franzese@gmx.com <michael-franzese@gmx.com> [2021-05-18 01:32]: > 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)) (defun my-insert-on-eol (s) (when (eolp) (insert s))) -- Jean Take action in Free Software Foundation campaigns: https://www.fsf.org/campaigns Sign an open letter in support of Richard M. Stallman https://stallmansupport.org/ https://rms-support-letter.github.io/
[Prev in Thread] | Current Thread | [Next in Thread] |