;;; replace.el --- replace commands for Emacs
-;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2011
+;; Copyright (C) 1985-1987, 1992, 1994, 1996-1997, 2000-2012
;; Free Software Foundation, Inc.
;; Maintainer: FSF
(define-key map [occur-rename-buffer]
`(menu-item ,(purecopy "Rename Occur Buffer") occur-rename-buffer
:help ,(purecopy "Rename the current *Occur* buffer to *Occur: original-buffer-name*.")))
+ (define-key map [occur-edit-buffer]
+ `(menu-item ,(purecopy "Edit Occur Buffer") occur-edit-mode
+ :help ,(purecopy "Edit the *Occur* buffer and apply changes to the original buffers.")))
(define-key map [separator-2] menu-bar-separator)
(define-key map [occur-mode-goto-occurrence-other-window]
`(menu-item ,(purecopy "Go To Occurrence Other Window") occur-mode-goto-occurrence-other-window
"Keymap that defines the responses to questions in `query-replace'.
The \"bindings\" in this map are not commands; they are answers.
The valid answers include `act', `skip', `act-and-show',
-`exit', `act-and-exit', `edit', `delete-and-edit', `recenter',
-`automatic', `backup', `exit-prefix', and `help'.")
+`exit', `act-and-exit', `edit', `edit-replacement', `delete-and-edit',
+`recenter', `automatic', `backup', `exit-prefix', `quit', and `help'.")
(defvar multi-query-replace-map
(let ((map (make-sparse-keymap)))
t t)))
(defun replace-loop-through-replacements (data count)
- ;; DATA is a vector contaning the following values:
+ ;; DATA is a vector containing the following values:
;; 0 next-rotate-count
;; 1 repeat-count
;; 2 next-replacement
(if query-replace-lazy-highlight
(let ((isearch-string string)
(isearch-regexp regexp)
+ ;; Set isearch-word to nil because word-replace is regexp-based,
+ ;; so `isearch-search-fun' should not use `word-search-forward'.
+ (isearch-word nil)
(search-whitespace-regexp nil)
(isearch-case-fold-search case-fold)
(isearch-forward t)
(isearch-error nil))
- ;; Set isearch-word to nil because word-replace is regexp-based,
- ;; so `isearch-search-fun' should not use `word-search-forward'.
- (if (and isearch-word isearch-regexp) (setq isearch-word nil))
(isearch-lazy-highlight-new-loop range-beg range-end))))
(defun replace-dehighlight ()