]> code.delx.au - gnu-emacs/blobdiff - lisp/isearch.el
* lisp/replace.el (perform-replace): Move let-bindings of isearch-*
[gnu-emacs] / lisp / isearch.el
index 3799376701372a32de9bc2cecbfabe8005d81b9d..972fb0058d346a1113534b324a2455aa995984f8 100644 (file)
@@ -1,6 +1,6 @@
 ;;; isearch.el --- incremental search minor mode
 
-;; Copyright (C) 1992-1997, 1999-201 Free Software Foundation, Inc.
+;; Copyright (C) 1992-1997, 1999-2013 Free Software Foundation, Inc.
 
 ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
 ;; Maintainer: FSF
@@ -2149,7 +2149,8 @@ Isearch mode."
                 (setq prefix-arg arg)
                 (apply 'isearch-unread keylist))
             (setq keylist
-                  (listify-key-sequence (lookup-key local-function-key-map key)))
+                  (listify-key-sequence
+                   (lookup-key local-function-key-map key)))
             (while keylist
               (setq key (car keylist))
               ;; If KEY is a printing char, we handle it here
@@ -2158,6 +2159,9 @@ Isearch mode."
               (if (and (integerp key)
                        (>= key ?\s) (/= key 127) (< key 256))
                   (progn
+                    ;; Ensure that the processed char is recorded in
+                    ;; the keyboard macro, if any (Bug#4894)
+                    (store-kbd-macro-event key)
                     (isearch-process-search-char key)
                     (setq keylist (cdr keylist)))
                 ;; As the remaining keys in KEYLIST can't be handled
@@ -2491,6 +2495,7 @@ Can be changed via `isearch-search-fun-function' for special needs."
       ;; the user adds and removes characters in the search string
       ;; (or when using nonincremental word isearch)
       (let ((lax (not (or isearch-nonincremental
+                         (null (car isearch-cmds))
                          (eq (length isearch-string)
                              (length (isearch--state-string
                                        (car isearch-cmds))))))))