branch: externals/dict-tree commit 8d134c2d8a7492c3670408a20f638d59552b6173 Author: Toby S. Cubitt <toby-predict...@dr-qubit.org> Commit: Toby S. Cubitt <toby-predict...@dr-qubit.org>
Fix bug in dictree-create with empty NAME argument. --- dict-tree.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/dict-tree.el b/dict-tree.el index f0b1042..aa17c64 100644 --- a/dict-tree.el +++ b/dict-tree.el @@ -639,8 +639,9 @@ structure. See `trie-create' for details." ;; sadly, passing null values over-rides the defaults in the defstruct ;; dictree--create, so we have to explicitly set the defaults again ;; here - (or name (setq name (and filename (file-name-sans-extension - (file-name-nondirectory filename))))) + (or name (setq name (and filename (make-symbol + (file-name-sans-extension + (file-name-nondirectory filename)))))) (or comparison-function (setq comparison-function '<)) (or insert-function (setq insert-function (lambda (a _b) a))) (or rank-function (setq rank-function (lambda (a b) (> (cdr a) (cdr b)))))