|
From: | Matt Price |
Subject: | Re: [O] [OT] wildcards in autocorrect? |
Date: | Sat, 28 Mar 2015 15:56:34 -0400 |
This is the code Samuel refers to. It is awesome. I use it less and less ;) by which I mean everytime I use it is one less time I ever have to use it.(define-key ctl-x-map "\C-i" 'endless/ispell-word-then-abbrev)(defun endless/ispell-word-then-abbrev (p)"Call `ispell-word'. Then create an abbrev for the correction made.With prefix P, create local abbrev. Otherwise it will be global."(interactive "P")(let ((bef (downcase (or (thing-at-point 'word) ""))) aft)(call-interactively 'ispell-word)(setq aft (downcase (or (thing-at-point 'word) "")))(unless (string= aft bef)(message "\"%s\" now expands to \"%s\" %sally"bef aft (if p "loc" "glob"))(define-abbrev(if p global-abbrev-table local-abbrev-table)bef aft))))
[Prev in Thread] | Current Thread | [Next in Thread] |