Subject: searching for multiple words in M-x customize window is broken

From: Zachary Kanfer <[email-masked]>
Date: Sun, 27 Feb 2011 23:37:10 -0500

This bug exists in Emacs built from the bzr source code, version GNU Emacs
24.0.50.1 (x86_64-unknown-linux-gnu) of 2011-02-27 on zck-desktop
Steps to reproduce:
1. M-x customize<ret>
2. Go to the search bar, and type in "grouping backslash", without quotes.
3. Press enter, and get the message that no results have been found.
4. Change the search query to "backslash", again without quotes, and press
enter. One result is found: "Font Lock Regexp Grouping Backslash", which
should be found for the previous search.

This behavior is exhibited for any query with multiple words.

Attached is a patch which splits the input string before passing it to
customize-apropos, which already handles lists of strings.

-Zachary Kanfer
# Bazaar merge directive format 2 (Bazaar 0.90)
# revision_id: [email-masked]
# target_branch: nosmart+bzr://bzr.savannah.gnu.org/emacs/trunk/
# testament_sha1: 91d3ebd5cc50e43a52c14307785ba638961653c9
# timestamp: 2011-02-27 23:34:45 -0500
# base_revision_id: [email-masked]
# 
# Begin patch
=== modified file 'lisp/cus-edit.el'
--- lisp/cus-edit.el	2011-01-25 04:08:28 +0000
+++ lisp/cus-edit.el	2011-02-25 04:27:21 +0000
@@ -1599,7 +1599,9 @@
 	       'editable-field
 	       :size 40 :help-echo echo
 	       :action `(lambda (widget &optional event)
-			  (customize-apropos (widget-value widget))))))
+			  (customize-apropos (split-string (widget-value widget)
+							   split-string-default-separators
+							   t))))))
 	(widget-insert " ")
 	(widget-create-child-and-convert
 	 search-widget 'push-button

# Begin bundle