emacs-elpa-diffs
[Top][All Lists]
Advanced

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

[elpa] externals/typo ecec5009b5 10/18: Add user option 'typo-support-al


From: ELPA Syncer
Subject: [elpa] externals/typo ecec5009b5 10/18: Add user option 'typo-support-all-completions'
Date: Sun, 26 Mar 2023 08:01:31 -0400 (EDT)

branch: externals/typo
commit ecec5009b59c55c96ea74897812bb424fe100c87
Author: Philip Kaludercic <philipk@posteo.net>
Commit: Philip Kaludercic <philipk@posteo.net>

    Add user option 'typo-support-all-completions'
---
 typo.el | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/typo.el b/typo.el
index 4a74f6fcd7..c78a1f3cc3 100644
--- a/typo.el
+++ b/typo.el
@@ -57,6 +57,13 @@ indicating the maximal number of permitted typos."
   "Number of characters a word may expand."
   :type 'natnum)
 
+(defcustom typo-support-all-completions t
+  "Non-nil means enable support for `all-completions'.
+When enabled typo-based completion will also be applied to the
+*Completions* buffer (or analogous concepts in other completion
+frameworks)."
+  :type 'boolean)
+
 (define-inline typo--test (word key)
   (inline-letevals (word key)
     (inline-quote
@@ -115,7 +122,8 @@ single-letter typos are searched."
 (defun typo-all-completions (string collection pred _point)
   "Generate all  versions of the STRING using COLLECTION.
 COLLECTION and PRED are as defined in `all-completions'."
-  (typo-edits string collection pred))
+  (and typo-support-all-completions
+       (typo-edits string collection pred)))
 
 ;;;###autoload
 (defun typo-try-completion (string collection pred _point &optional _metadata)



reply via email to

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