From: Juanma Barranquero Date: Thu, 13 Feb 2014 05:23:06 +0000 (+0100) Subject: * lisp/apropos.el (apropos-read-pattern): Fix error message for empty string. X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~9 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c9b6b2624b64d119d2d6a1084c478413353a0721;p=emacs.git * lisp/apropos.el (apropos-read-pattern): Fix error message for empty string. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 19df506e3a1..d5c0f6aa552 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2014-02-13 Juanma Barranquero + + * apropos.el (apropos-read-pattern): When the user passes an empty + string, give a more helpful error message than "Wrong type + argument: stringp, nil". + 2014-02-13 Stefan Monnier * jit-lock.el (jit-lock-mode): Keep it disabled in indirect buffers. diff --git a/lisp/apropos.el b/lisp/apropos.el index f24871d5d20..93e2e42ee9b 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el @@ -370,7 +370,8 @@ kind of objects to search." (read-string (concat "Search for " subject " (word list or regexp): ")))) (if (string-equal (regexp-quote pattern) pattern) ;; Split into words - (split-string pattern "[ \t]+" t) + (or (split-string pattern "[ \t]+" t) + (user-error "No word list given")) pattern))) (defun apropos-parse-pattern (pattern)