From: Eli Zaretskii Date: Sat, 19 Mar 2005 14:35:59 +0000 (+0000) Subject: (finder-current-item): Throw an error on an empty line. X-Git-Tag: ttn-vms-21-2-B4~1690 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=62832105d79435a93a4a402f321f4401933184a9;p=emacs.git (finder-current-item): Throw an error on an empty line. --- 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."