diff --git a/dad-joke.el b/dad-joke.el index adbfc4c..e5a7eae 100644 --- a/dad-joke.el +++ b/dad-joke.el @@ -43,9 +43,11 @@ If INSERT is non-nil the joke will be inserted into the current buffer rather than shown in the minibuffer." (interactive "P") (let ((joke (dad-joke-get))) - (if insert - (insert joke) - (message joke)))) + (if (and joke (not (zerop (length joke)))) + (if insert + (insert joke) + (message joke)) + (error "I didn't get the joke! :-(")))) (provide 'dad-joke)