]> code.delx.au - gnu-emacs/blobdiff - lisp/emacs-lisp/subr-x.el
Update copyright year to 2016
[gnu-emacs] / lisp / emacs-lisp / subr-x.el
index bd178faa4affb80922ff55a10fe84e9633b5ba4d..e8d1939865f78dd1648c38924c42d9c22d901fa7 100644 (file)
@@ -1,6 +1,6 @@
 ;;; subr-x.el --- extra Lisp functions  -*- lexical-binding:t -*-
 
-;; Copyright (C) 2013-2015 Free Software Foundation, Inc.
+;; Copyright (C) 2013-2016 Free Software Foundation, Inc.
 
 ;; Maintainer: emacs-devel@gnu.org
 ;; Keywords: convenience
@@ -140,6 +140,10 @@ to bind a single value, BINDINGS can just be a plain tuple."
   (declare (indent 1) (debug if-let))
   (list 'if-let bindings (macroexp-progn body)))
 
+(defsubst hash-table-empty-p (hash-table)
+  "Check whether HASH-TABLE is empty (has 0 elements)."
+  (zerop (hash-table-count hash-table)))
+
 (defsubst hash-table-keys (hash-table)
   "Return a list of keys in HASH-TABLE."
   (let ((keys '()))