From: Richard M. Stallman Date: Sat, 28 Jun 1997 03:15:16 +0000 (+0000) Subject: (nonincremental-repeat-search-forward) X-Git-Tag: emacs-20.1~1463 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=008c84933e6cb14b75d5c3b67e60e084978174b4;p=emacs.git (nonincremental-repeat-search-forward) (nonincremental-repeat-search-backward) (nonincremental-repeat-re-search-forward) (nonincremental-repeat-re-search-backward): Special error check for no previous search. --- diff --git a/lisp/menu-bar.el b/lisp/menu-bar.el index 0103d82c43a..2828481d2dd 100644 --- a/lisp/menu-bar.el +++ b/lisp/menu-bar.el @@ -183,21 +183,29 @@ A large number or nil slows down menu responsiveness." (defun nonincremental-repeat-search-forward () "Search forward for the previous search string." (interactive) + (if (null search-ring) + (error "No previous search")) (search-forward (car search-ring))) (defun nonincremental-repeat-search-backward () "Search backward for the previous search string." (interactive) + (if (null search-ring) + (error "No previous search")) (search-backward (car search-ring))) (defun nonincremental-repeat-re-search-forward () "Search forward for the previous regular expression." (interactive) + (if (null regex-search-ring) + (error "No previous search")) (re-search-forward (car regexp-search-ring))) (defun nonincremental-repeat-re-search-backward () "Search backward for the previous regular expression." (interactive) + (if (null regex-search-ring) + (error "No previous search")) (re-search-backward (car regexp-search-ring))) (define-key menu-bar-search-menu [query-replace-regexp]