A match split across lines preserves all the lines it lies in.
Applies to all lines after point."
(interactive (list (read-from-minibuffer
- "sKeep lines (containing match for regexp): "
+ "Keep lines (containing match for regexp): "
nil nil nil 'regexp-history)))
(save-excursion
(or (bolp) (forward-line 1))
If a match is split across lines, all the lines it lies in are deleted.
Applies to lines after point."
(interactive (list (read-from-minibuffer
- "sFlush lines (containing match for regexp): "
+ "Flush lines (containing match for regexp): "
nil nil nil 'regexp-history)))
(save-excursion
(while (and (not (eobp))
(defun how-many (regexp)
"Print number of matches for REGEXP following point."
(interactive (list (read-from-minibuffer
- "sHow many matches for (regexp): "
+ "How many matches for (regexp): "
nil nil nil 'regexp-history)))
(let ((count 0) opoint)
(save-excursion
(define-key query-replace-map "n" 'skip)
(define-key query-replace-map "," 'act-and-show)
(define-key query-replace-map "\e" 'exit)
+(define-key query-replace-map [escape] 'exit)
(define-key query-replace-map "q" 'exit)
+(define-key query-replace-map "\r" 'exit)
+(define-key query-replace-map [return] 'exit)
(define-key query-replace-map "." 'act-and-exit)
(define-key query-replace-map "\C-r" 'edit)
(define-key query-replace-map "\C-w" 'delete-and-edit)