]> code.delx.au - gnu-emacs/blobdiff - lisp/replace.el
(while): Comment out converter.
[gnu-emacs] / lisp / replace.el
index 634c42691e8dcbaa28872f0ba7e55fa72bb5ffc9..49f3920dded301a6b7b34f5b434eef9a58e1ea20 100644 (file)
@@ -146,13 +146,13 @@ which will run faster and will not set the mark or print anything."
 (defvar regexp-history nil
   "History list for some commands that read regular expressions.")
 
-(fset 'delete-non-matching-lines 'keep-lines)
+(defalias 'delete-non-matching-lines 'keep-lines)
 (defun keep-lines (regexp)
   "Delete all lines except those containing matches for REGEXP.
 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))
@@ -173,13 +173,13 @@ Applies to all lines after point."
        (and (not (eobp)) (= (match-beginning 0) (match-end 0))
             (forward-char 1))))))
 
-(fset 'delete-matching-lines 'flush-lines)
+(defalias 'delete-matching-lines 'flush-lines)
 (defun flush-lines (regexp)
   "Delete lines containing matches for REGEXP.
 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))
@@ -189,11 +189,11 @@ Applies to lines after point."
                                     (point))
                     (progn (forward-line 1) (point))))))
 
-(fset 'count-matches 'how-many)
+(defalias 'count-matches 'how-many)
 (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
@@ -258,7 +258,7 @@ in the buffer that the occurrences were found in.
 match.  A negative number means to include that many lines before the match.
 A positive number means to include that many lines both before and after.")
 
-(fset 'list-matching-lines 'occur)
+(defalias 'list-matching-lines 'occur)
 
 (defun occur (regexp &optional nlines)
   "Show all lines in the current buffer containing a match for REGEXP.
@@ -393,7 +393,10 @@ The valid answers include `act', `skip', `act-and-show',
 (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)