/[emacs]/emacs/lisp/isearch.el
ViewVC logotype

Diff of /emacs/lisp/isearch.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.231 by monnier, Mon Jul 5 22:41:44 2004 UTC revision 1.232 by monnier, Mon Jul 5 23:28:42 2004 UTC
# Line 1  Line 1 
1  ;;; isearch.el --- incremental search minor mode  ;;; isearch.el --- incremental search minor mode
2    
3  ;; Copyright (C) 1992, 93, 94, 95, 96, 97, 1999, 2000, 01, 2003, 2004  ;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1999,
4  ;;   Free Software Foundation, Inc.  ;;   2000, 2001, 2003, 2004  Free Software Foundation, Inc.
5    
6  ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>  ;; Author: Daniel LaLiberte <liberte@cs.uiuc.edu>
7  ;; Maintainer: FSF  ;; Maintainer: FSF
# Line 59  Line 59 
59    
60  ;; TODO  ;; TODO
61  ;; - Integrate the emacs 19 generalized command history.  ;; - Integrate the emacs 19 generalized command history.
 ;; - Think about incorporating query-replace.  
62  ;; - Hooks and options for failed search.  ;; - Hooks and options for failed search.
63    
64  ;;; Change Log:  ;;; Change Log:
# Line 338  Default value, nil, means edit the strin Line 337  Default value, nil, means edit the strin
337      (define-key map "\M-r" 'isearch-toggle-regexp)      (define-key map "\M-r" 'isearch-toggle-regexp)
338      (define-key map "\M-e" 'isearch-edit-string)      (define-key map "\M-e" 'isearch-edit-string)
339    
340      (define-key map (kbd   "M-%") 'isearch-query-replace)      (define-key map [?\M-%] 'isearch-query-replace)
341      (define-key map (kbd "C-M-%") 'isearch-query-replace-regexp)      (define-key map [?\C-\M-%] 'isearch-query-replace-regexp)
342    
343      map)      map)
344    "Keymap for `isearch-mode'.")    "Keymap for `isearch-mode'.")
# Line 1062  Use `isearch-exit' to quit without signa Line 1061  Use `isearch-exit' to quit without signa
1061  (defun isearch-query-replace ()  (defun isearch-query-replace ()
1062    "Start query-replace with string to replace from last search string."    "Start query-replace with string to replace from last search string."
1063    (interactive)    (interactive)
1064    (let ((query-replace-interactive t)    (barf-if-buffer-read-only)
1065          (case-fold-search isearch-case-fold-search))    (let ((case-fold-search isearch-case-fold-search))
     ;; Put search string into the right ring  
     (setq isearch-regexp nil)  
1066      (isearch-done)      (isearch-done)
1067      (isearch-clean-overlays)      (isearch-clean-overlays)
1068      (and isearch-forward isearch-other-end (goto-char isearch-other-end))      (and isearch-forward isearch-other-end (goto-char isearch-other-end))
1069      (call-interactively 'query-replace)))      (perform-replace
1070         isearch-string
1071         (query-replace-read-to isearch-string "Query replace" isearch-regexp)
1072         t isearch-regexp isearch-word)))
1073    
1074  (defun isearch-query-replace-regexp ()  (defun isearch-query-replace-regexp ()
1075    "Start query-replace-regexp with string to replace from last search string."    "Start query-replace-regexp with string to replace from last search string."
# Line 2380  CASE-FOLD non-nil means the search was c Line 2380  CASE-FOLD non-nil means the search was c
2380          isearch-case-fold-search case-fold)          isearch-case-fold-search case-fold)
2381    (isearch-search))    (isearch-search))
2382    
2383  ;;; arch-tag: 74850515-f7d8-43a6-8a2c-ca90a4c1e675  ;; arch-tag: 74850515-f7d8-43a6-8a2c-ca90a4c1e675
2384  ;;; isearch.el ends here  ;;; isearch.el ends here

Legend:
Removed from v.1.231  
changed lines
  Added in v.1.232

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26