help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Inserting letter for words with initial letter sequence


From: carlmarcos
Subject: Re: Inserting letter for words with initial letter sequence
Date: Fri, 12 Aug 2022 08:21:32 +0200 (CEST)

Aug 12, 2022, 06:09 by bugs@gnu.support:

> * 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:
>
I cannot do all these defines for every word in the dictionary.  I need some 
way to look at a word
and decide whether `cog' exists and a replacement done to `k', and so on.



reply via email to

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