# HG changeset patch # User Eli Zaretskii # Date 1111242959 0 # Node ID 23533546bb3850c507ff133830af8136882bb699 # Parent 82892a53d9bee0de3dce610f2341afce35819b1a (finder-current-item): Throw an error on an empty line. diff -r 82892a53d9be -r 23533546bb38 lisp/finder.el --- a/lisp/finder.el Sat Mar 19 14:25:29 2005 +0000 +++ b/lisp/finder.el Sat Mar 19 14:35:59 2005 +0000 @@ -301,11 +301,13 @@ (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."