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 00:31:01 +0200

   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))



   Sent: Tuesday, May 18, 2021 at 10:02 AM
   From: "Skip Montanaro" <skip.montanaro@gmail.com>
   To: michael-franzese@gmx.com
   Cc: "Help Gnu Emacs" <help-gnu-emacs@gnu.org>
   Subject: Re: Determining existence of text following point
   > Is there a way to figure out whether
   > there exist any characters on line
   > after point.

   Maybe

   (looking-at-p ".")

   ?

   Full details on regular expressions searching here

   [1]https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Sea
   rch.html

   Skip

References

   1. 
https://www.gnu.org/software/emacs/manual/html_node/elisp/Regexp-Search.html


reply via email to

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