From 33e922645b475fe01834c7071043301780def0a0 Mon Sep 17 00:00:00 2001 From: HyunggyuJang Date: Thu, 16 Sep 2021 01:59:43 +0900 Subject: [PATCH] fix(snippets): yas-expand error on yas-choose-value (#5429) `+snippets-prompt-private` was overzealous intercepting the candidates fed to `yas-choose-value`. For example, expanding the `jupyter` snippet in org mode results in: \#+begin_src jupyter-Wrong type argument: yas--template, "python" :session :async yes ... \#+end_src --- modules/editor/snippets/autoload/snippets.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/editor/snippets/autoload/snippets.el b/modules/editor/snippets/autoload/snippets.el index 2b5f70c1d..539a11b80 100644 --- a/modules/editor/snippets/autoload/snippets.el +++ b/modules/editor/snippets/autoload/snippets.el @@ -20,7 +20,9 @@ If there are conflicting keys across the two camps, the built-in ones are ignored. This makes it easy to override built-in snippets with private ones." (when (eq this-command 'yas-expand) (let* ((gc-cons-threshold most-positive-fixnum) - (choices (cl-remove-duplicates choices :test #'+snippets--remove-p))) + (choices (condition-case _ + (cl-remove-duplicates choices :test #'+snippets--remove-p) + (wrong-type-argument choices)))) (if (cdr choices) (cl-loop for fn in (cdr (memq '+snippets-prompt-private yas-prompt-functions)) if (funcall fn prompt choices display-fn)