* lisp/textmodes/reftex-cite.el (reftex-extract-bib-entries): Signal an
error when the user tries searching with a regexp matching the empty
string.
(setq first-re (car re-list) ; We'll use the first re to find things,
rest-re (cdr re-list)) ; the others to narrow down.
(if (string-match "\\`[ \t]*\\'" (or first-re ""))
- (error "Empty regular expression"))
+ (user-error "Empty regular expression"))
+ (if (string-match first-re "")
+ (user-error "Regular expression matches the empty string."))
(save-excursion
(save-window-excursion