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

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

[elpa] externals/dict-tree 0aed5d4 043/154: Modified dictree--read-line


From: Stefan Monnier
Subject: [elpa] externals/dict-tree 0aed5d4 043/154: Modified dictree--read-line to call data and plist load functions with null argument
Date: Mon, 14 Dec 2020 12:21:41 -0500 (EST)

branch: externals/dict-tree
commit 0aed5d4bbd6fe3c00bd10a508b78e5a71f184bba
Author: Toby Cubitt <toby-predictive@dr-qubit.org>
Commit: tsc25 <toby-predictive@dr-qubit.org>

    Modified dictree--read-line to call data and plist load functions with null 
argument
    if these are absent from the file.
    Updated documentation for predictive-create-dict populate file format.
---
 dict-tree.el | 24 +++++++++++-------------
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/dict-tree.el b/dict-tree.el
index 46dfdf4..b0d7958 100644
--- a/dict-tree.el
+++ b/dict-tree.el
@@ -2749,19 +2749,17 @@ are created when using a trie that is not 
self-balancing, see
       (when (dictree--key-loadfun dict)
        (setq key (funcall (dictree--key-loadfun dict) key)))
       ;; if there's anything after the key, use it as data
-      (if (eq (line-end-position) (point))
-         (list key)
-       (setq data (read (current-buffer)))
-       (when (dictree--data-loadfun dict)
-         (setq data (funcall (dictree--data-loadfun dict) data)))
-       (if (eq (line-end-position) (point))
-           (list key data)
-         ;; if there's anything after the data, use is as the property list
-         (setq plist (read (current-buffer)))
-         (when (dictree--plist-loadfun dict)
-           (funcall (dictree--plist-loadfun dict) plist))
-         ;; return the key and data
-         (list key data plist))))))
+      (unless (eq (line-end-position) (point))
+       (setq data (read (current-buffer))))
+      (when (dictree--data-loadfun dict)
+       (setq data (funcall (dictree--data-loadfun dict) data)))
+      ;; if there's anything after the data, use is as the property list
+      (unless (eq (line-end-position) (point))
+       (setq plist (read (current-buffer))))
+      (when (dictree--plist-loadfun dict)
+       (funcall (dictree--plist-loadfun dict) plist))
+      ;; return the key and data
+      (list key data plist))))
 
 
 



reply via email to

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