branch: externals/cape commit 86a1df6cbacd0e05b801208f83be5ca6c1cc8cec Author: Daniel Mendler <m...@daniel-mendler.de> Commit: Daniel Mendler <m...@daniel-mendler.de>
cape-super-capf: Fix nil error (See #45) --- cape.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cape.el b/cape.el index 6d39c05674..c6db8133f9 100644 --- a/cape.el +++ b/cape.el @@ -555,7 +555,7 @@ If INTERACTIVE is nil the function acts like a Capf." (cl-loop for (table . plist) in tables do (let* ((pr (if-let (pr (plist-get plist :predicate)) (if pred - (lambda (x) (and (funcall pred x) (funcall pr x))) + (lambda (x) (and (funcall pr x) (funcall pred x))) pr) pred)) (md (completion-metadata "" table pr)) @@ -569,7 +569,7 @@ If INTERACTIVE is nil the function acts like a Capf." (setcar cell nil))) (setq candidates (nconc candidates cands)))) (setq cand-ht ht) - candidates)) + (delq nil candidates))) (_ (completion--some (pcase-lambda (`(,table . ,plist)) @@ -577,7 +577,7 @@ If INTERACTIVE is nil the function acts like a Capf." action table str (if-let (pr (plist-get plist :predicate)) (if pred - (lambda (x) (and (funcall pred x) (funcall pr x))) + (lambda (x) (and (funcall pr x) (funcall pred x))) pr) pred))) tables))))