branch: externals/cursory
commit 4b2605acb95a766e54988ad33072a8e1b63c2da1
Author: Protesilaos Stavrou <i...@protesilaos.com>
Commit: Protesilaos Stavrou <i...@protesilaos.com>

    Make cursory--preset-p return an error if it must
---
 cursory.el | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/cursory.el b/cursory.el
index a13f9cfd8c..2ba0263e7c 100644
--- a/cursory.el
+++ b/cursory.el
@@ -267,8 +267,9 @@ Saving is done by the `cursory-store-latest-preset' 
function."
 
 (defun cursory--preset-p (preset)
   "Return non-nil if PRESET is one of the named `cursory-presets'."
-  (let ((presets (cursory--get-presets)))
-    (memq preset presets)))
+  (if-let* ((presets (cursory--get-presets)))
+      (memq preset presets)
+    (error "There are no named presets in `cursory-presets'")))
 
 (defun cursory--get-inherit-name (preset)
   "Get the `:inherit' value of PRESET."

Reply via email to