Mercurial > emacs
comparison lisp/replace.el @ 2327:61b35714d880
(query-replace-map): Define backspace like delete.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Tue, 23 Mar 1993 02:26:42 +0000 |
parents | 9e7ec92a4fdf |
children | a9c05a12b615 |
comparison
equal
deleted
inserted
replaced
2326:cac023fe9d13 | 2327:61b35714d880 |
---|---|
374 `automatic', `backup', and `help'.") | 374 `automatic', `backup', and `help'.") |
375 | 375 |
376 (define-key query-replace-map " " 'act) | 376 (define-key query-replace-map " " 'act) |
377 (define-key query-replace-map "\d" 'skip) | 377 (define-key query-replace-map "\d" 'skip) |
378 (define-key query-replace-map [delete] 'skip) | 378 (define-key query-replace-map [delete] 'skip) |
379 (define-key query-replace-map [backspace] 'skip) | |
379 (define-key query-replace-map "y" 'act) | 380 (define-key query-replace-map "y" 'act) |
380 (define-key query-replace-map "n" 'skip) | 381 (define-key query-replace-map "n" 'skip) |
381 (define-key query-replace-map "," 'act-and-show) | 382 (define-key query-replace-map "," 'act-and-show) |
382 (define-key query-replace-map "\e" 'exit) | 383 (define-key query-replace-map "\e" 'exit) |
383 (define-key query-replace-map "q" 'exit) | 384 (define-key query-replace-map "q" 'exit) |
472 ;; Loop reading commands until one of them sets done, | 473 ;; Loop reading commands until one of them sets done, |
473 ;; which means it has finished handling this occurrence. | 474 ;; which means it has finished handling this occurrence. |
474 (while (not done) | 475 (while (not done) |
475 (message "Query replacing %s with %s: " | 476 (message "Query replacing %s with %s: " |
476 from-string next-replacement) | 477 from-string next-replacement) |
477 (setq key (vector (read-event))) | 478 (setq key (read-event)) |
479 (setq key (vector key)) | |
478 (setq def (lookup-key map key)) | 480 (setq def (lookup-key map key)) |
479 ;; Restore the match data while we process the command. | 481 ;; Restore the match data while we process the command. |
480 (store-match-data real-match-data) | 482 (store-match-data real-match-data) |
481 (cond ((eq def 'help) | 483 (cond ((eq def 'help) |
482 (with-output-to-temp-buffer "*Help*" | 484 (with-output-to-temp-buffer "*Help*" |