[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Inserting letter for words with initial letter sequence
From: |
Jean Louis |
Subject: |
Re: Inserting letter for words with initial letter sequence |
Date: |
Fri, 12 Aug 2022 09:09:35 +0300 |
User-agent: |
Mutt/+ () (2022-06-11) |
* carlmarcos--- via Users list for the GNU Emacs text editor
<help-gnu-emacs@gnu.org> [2022-08-12 02:21]:
>
> I would like to introduce the letter `k' for words with initial `cog', `col',
> `com', `con', `cor', `coun', and `cum' using an elisp command defined in my
> init file.
> That is
>
> "cognize" changed to "knize"
> "collect" to "klect"
> "corrupt" to "krupt"
> "cumulatively" to "kulatively".
Then just use Emacs' facility for abbrevs, and turn on
abbrev-mode, write "cognize⬛" and put cursor after word and use
`C-x a g' to add the abbrev interactively.
Programmatically, if you are to add it to `global-abbrev-table'
then you do following:
(define-abbrev global-abbrev-table "cognize" "knize")
(define-abbrev global-abbrev-table "collect" "klect")
and do not forget to save abbrevs:
--
Jean
Take action in Free Software Foundation campaigns:
https://www.fsf.org/campaigns
In support of Richard M. Stallman
https://stallmansupport.org/