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

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

[elpa] externals/typo dde7825cc0 06/18: Summary: Check functionp before


From: ELPA Syncer
Subject: [elpa] externals/typo dde7825cc0 06/18: Summary: Check functionp before listp
Date: Sun, 26 Mar 2023 08:01:31 -0400 (EDT)

branch: externals/typo
commit dde7825cc0c687f9271d545740920463f85624e7
Author: Philip Kaludercic <philip.kaludercic@fau.de>
Commit: Philip Kaludercic <philip.kaludercic@fau.de>

    Summary: Check functionp before listp
    
    This is necessary to avoid confusing a (closure ...) for a list.
---
 typo.el | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/typo.el b/typo.el
index a69eede300..3407b2d232 100644
--- a/typo.el
+++ b/typo.el
@@ -4,7 +4,7 @@
 
 ;; Author: Philip Kaludercic <philip.kaludercic@fau.de>
 ;; URL: https://wwwcip.cs.fau.de/~oj14ozun/src+etc/typo.el
-;; Version: $Id: typo.el,v 1.4 2023/01/15 12:48:20 oj14ozun Exp oj14ozun $
+;; Version: $Id: typo.el,v 1.5 2023/01/15 12:49:56 oj14ozun Exp oj14ozun $
 ;; Package-Requires: ((emacs "27.1"))
 ;; Package-Version: 1
 ;; Keywords: convenience
@@ -68,6 +68,8 @@ returned.  The variable `typo-level' specifies how many
 single-letter typos are searched."
   (let (new-words)
     (cond
+     ((functionp collection)
+      (typo-edits word (funcall collection "" pred t) pred))
      ((and (listp collection) (consp (car collection))) ;alist
       (dolist (entry collection new-words)
        (let ((key (car entry)))
@@ -93,9 +95,7 @@ single-letter typos are searched."
         (when (typo--test word atom)
           (push atom new-words)))
        collection)
-      new-words)
-     ((functionp collection)
-      (typo-edits word (funcall collection "" pred t) pred)))))
+      new-words))))
 
 ;;;###autoload
 (defun typo-all-completions (string collection pred _point)



reply via email to

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