* lisp/apropos.el (apropos-read-pattern): Fix error message for empty string.

This commit is contained in:
Juanma Barranquero 2014-02-13 06:23:06 +01:00
parent eb4c6947f5
commit c9b6b2624b
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2014-02-13 Juanma Barranquero <lekktu@gmail.com>
* 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 <monnier@iro.umontreal.ca>
* jit-lock.el (jit-lock-mode): Keep it disabled in indirect buffers.

View file

@ -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)