From ea7fc45044ee3da60f07d47cf83bf9bcb7aa7c23 Mon Sep 17 00:00:00 2001 From: Tollef Fog Heen Date: Fri, 1 Aug 2008 12:56:45 +0200 Subject: [PATCH] Give error message when no matching records are found --- lisp/eweouz.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/eweouz.el b/lisp/eweouz.el index 70ff29b..216f569 100644 --- a/lisp/eweouz.el +++ b/lisp/eweouz.el @@ -62,11 +62,13 @@ (eweouz-search-do '(lambda (x) (add-to-list 'match-recs x)) typed) (message (format "%s" match-recs)) (message (format "%d" (length match-recs))) - (cond ((= 1 (length match-recs)) + (cond ((= 0 (length match-recs)) + (message "No matching records")) + ((= 1 (length match-recs) ; Just one match; insert it (progn (delete-region beg end) - (insert (vcard-format-sample-get-name (car match-recs))))) + (insert (vcard-format-sample-get-name (car match-recs)))))) ((< 1 (length match-recs)) ;; For now, just display the records and leave the user to ;; complete -- 2.39.5