Implement Mickey Petersen's correcting typos with abbrev

This commit is contained in:
Gerard Vermeulen 2022-06-05 11:59:13 +02:00
parent 5b23ca54cd
commit 0cd4fc93e7
2 changed files with 4111 additions and 0 deletions

View File

@ -2761,6 +2761,29 @@ non-interactive =org-element= functions to an =Emacs-lisp= buffer.
:CUSTOM_ID: sec:writing-tools
:END:
*** [[info:emacs#Abbrevs][Abbrevs (info)]]
:PROPERTIES:
:CUSTOM_ID: sec:writing-abbreviations
:END:
[[https://www.masteringemacs.org/article/correcting-typos-misspellings-abbrev][Correcting Typos and Misspellings with Abbrev]] is an interesting post by [[https://www.masteringemacs.org/][Mickey
Peterson]] showing how to use [[info:emacs#Keyboard Macros][Keyboard Macros (info)]] to exploit the [[https://en.wikipedia.org/wiki/Wikipedia:Lists_of_common_misspellings/For_machines][Wikipedia
list of common misspellings for machines]]. Listing [[lst:misspellings-abbrev]]
defines his keyboard macro under the name =misspellings-abrev=.
#+caption[Definition of the =misspellings-abbrev= keyboard macro]:
#+caption: Definition of the =misspellings-abbrev= keyboard macro.
#+name: lst:misspellings-abbrev
#+begin_src emacs-lisp
(with-eval-after-load 'emacs
(fset 'misspellings-abbrev
(kmacro-lambda-form
[?\C-s ?- ?> return backspace backspace ?\C-k ?\C-x ?a ?i ?g ?\C-y return]
0 "%d"))
(setq-default abbrev-mode t))
#+end_src
*** [[https://github.com/tecosaur/lexic#readme][Emacs LEXICal information viewer]]
:PROPERTIES:
:CUSTOM_ID: sec:writing-lexic

4088
etc/abbrev.el Normal file

File diff suppressed because it is too large Load Diff