|
From: | Stefan Monnier |
Subject: | Re: [PATCH] Add new function to test whether a key is present in a hash table. |
Date: | Thu, 15 Feb 2018 17:59:22 -0500 |
User-agent: | Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
> Such a function is useful because in Emacs Lisp, 'gethash' cannot > return whether the key is present as in Common Lisp, and using > 'gethash' alone to test for presence is nontrivial. We could also implement it in Elisp: (defun hash-table-contains-p (key table) (let ((x '(:hash-table-contains-p))) (not (eq x (gethash key table x))))) -- Stefan
[Prev in Thread] | Current Thread | [Next in Thread] |