unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* Apply replacement on word occurring at point using a lisp function
@ 2022-08-12 19:48 uzibalqa via Users list for the GNU Emacs text editor
  2022-08-12 20:24 ` Jean Louis
  0 siblings, 1 reply; 7+ messages in thread
From: uzibalqa via Users list for the GNU Emacs text editor @ 2022-08-12 19:48 UTC (permalink / raw)
  To: help-gnu-emacs@gnu.org

I want to insert the letter `k' for words with initial `cog', `col', `com', `con', `cor', `coun', `cum'."

For this I have written

(replace-regexp "\\<\\(co[glmnr]\\|coun\\|cum\\)" "k")

What I want to do is apply the replacement on the word occurring at point using a lisp function. How can this be achieved?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-08-13 14:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-12 19:48 Apply replacement on word occurring at point using a lisp function uzibalqa via Users list for the GNU Emacs text editor
2022-08-12 20:24 ` Jean Louis
2022-08-12 20:28   ` uzibalqa
2022-08-12 20:37     ` Jean Louis
2022-08-12 20:59       ` uzibalqa
2022-08-13 10:24         ` Jean Louis
2022-08-13 14:17           ` uzibalqa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).