+2008-07-30 Juri Linkov <juri@jurta.org>
+
+ * isearch.el (isearch-mode-map): Bind `M-s r' to
+ `isearch-toggle-regexp' and `M-s w' to `isearch-toggle-word'.
+ (search-map): Bind `M-s w' to `isearch-forward-word' globally
+ in the global map `search-map'.
+ (isearch-forward): Doc fix.
+ (isearch-forward-word, isearch-toggle-case-fold): New commands.
+
+ * simple.el (quoted-insert): Comment out code that treats
+ 0240-0377 specially.
+
2008-07-30 Chong Yidong <cyd@stupidchicken.com>
* cus-start.el: Add customization info for
(define-key map "\M-r" 'isearch-toggle-regexp)
(define-key map "\M-e" 'isearch-edit-string)
+ (define-key map "\M-sr" 'isearch-toggle-regexp)
+ (define-key map "\M-sw" 'isearch-toggle-word)
+
(define-key map [?\M-%] 'isearch-query-replace)
(define-key map [?\C-\M-%] 'isearch-query-replace-regexp)
(define-key map "\M-so" 'isearch-occur)
(define-key esc-map "\C-s" 'isearch-forward-regexp)
(define-key global-map "\C-r" 'isearch-backward)
(define-key esc-map "\C-r" 'isearch-backward-regexp)
+(define-key search-map "w" 'isearch-forward-word)
;; Entry points to isearch-mode.
If you try to exit with the search string still empty, it invokes
nonincremental search.
-Type \\[isearch-query-replace] to start `query-replace' with string to\
- replace from last search string.
-Type \\[isearch-query-replace-regexp] to start `query-replace-regexp'\
- with string to replace from last search string.
-
Type \\[isearch-toggle-case-fold] to toggle search case-sensitivity.
Type \\[isearch-toggle-regexp] to toggle regular-expression mode.
+Type \\[isearch-toggle-word] to toggle word mode.
Type \\[isearch-edit-string] to edit the search string in the minibuffer.
Also supported is a search ring of the previous 16 search strings.
ring.
Type \\[isearch-complete] to complete the search string using the search ring.
+Type \\[isearch-query-replace] to run `query-replace' with string to\
+ replace from last search string.
+Type \\[isearch-query-replace-regexp] to run `query-replace-regexp'\
+ with the last search string.
+Type \\[isearch-occur] to run `occur' that shows\
+ the last search string.
+Type \\[isearch-highlight-regexp] to run `highlight-regexp'\
+ that highlights the last search string.
+
Type \\[isearch-describe-bindings] to display all isearch key bindings.
Type \\[isearch-describe-key] to display documentation of isearch key.
Type \\[isearch-describe-mode] to display documentation of isearch mode.
(interactive "P\np")
(isearch-mode t (null not-regexp) nil (not no-recursive-edit)))
+(defun isearch-forward-word (&optional not-word no-recursive-edit)
+ "\
+Do incremental search forward for a sequence of words.
+With a prefix argument, do a regular string search instead.
+Like ordinary incremental search except that your input
+is treated as a sequence of words without regard to how the
+words are separated. See \\[isearch-forward] for more info."
+ (interactive "P\np")
+ (isearch-mode t nil nil (not no-recursive-edit) (null not-word)))
+
(defun isearch-backward (&optional regexp-p no-recursive-edit)
"\
Do incremental search backward.
(setq isearch-success t isearch-adjusted t)
(isearch-update))
+(defun isearch-toggle-word ()
+ "Toggle word searching on or off."
+ (interactive)
+ (setq isearch-word (not isearch-word))
+ (setq isearch-success t isearch-adjusted t)
+ (isearch-update))
+
(defun isearch-toggle-case-fold ()
"Toggle case folding in searching on or off."
(interactive)