From 62832105d79435a93a4a402f321f4401933184a9 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 19 Mar 2005 14:35:59 +0000 Subject: [PATCH] (finder-current-item): Throw an error on an empty line. --- lisp/finder.el | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lisp/finder.el b/lisp/finder.el index dc7343b9fb0..7a886e5480f 100644 --- a/lisp/finder.el +++ b/lisp/finder.el @@ -301,11 +301,13 @@ FILE should be in a form suitable for passing to `locate-library'." (finder-summary))) (defun finder-current-item () - (if (and finder-headmark (< (point) finder-headmark)) - (error "No keyword or filename on this line") - (save-excursion - (beginning-of-line) - (current-word)))) + (let ((key (save-excursion + (beginning-of-line) + (current-word)))) + (if (or (and finder-headmark (< (point) finder-headmark)) + (= (length key) 0)) + (error "No keyword or filename on this line") + key))) (defun finder-select () "Select item on current line in a finder buffer." -- 2.39.2