diff options
| author | Stefan Monnier | 2005-04-18 22:32:37 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2005-04-18 22:32:37 +0000 |
| commit | e5feeb319e19886646fab39839937afbfb81e324 (patch) | |
| tree | 2b628541cf5522f9b9fb78a258f0c9860ef6ae13 | |
| parent | 1338947ca028dde8f4ee6fb670b96747c406ac82 (diff) | |
| download | emacs-e5feeb319e19886646fab39839937afbfb81e324.tar.gz emacs-e5feeb319e19886646fab39839937afbfb81e324.zip | |
(isearch-edit-string): Make the search-ring available for
minibuffer history commands.
(minibuffer-local-isearch-map): Remove bindings for M-p and M-n,
the default history commands now work just as well.
(isearch-ring-retreat-edit, isearch-ring-advance-edit): Remove.
| -rw-r--r-- | lisp/ChangeLog | 12 | ||||
| -rw-r--r-- | lisp/isearch.el | 63 |
2 files changed, 16 insertions, 59 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index f0178d3cb38..4d8e8c6dd52 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,11 @@ | |||
| 1 | 2005-04-18 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * isearch.el (isearch-edit-string): Make the search-ring available for | ||
| 4 | minibuffer history commands. | ||
| 5 | (minibuffer-local-isearch-map): Remove bindings for M-p and M-n, | ||
| 6 | the default history commands now work just as well. | ||
| 7 | (isearch-ring-retreat-edit, isearch-ring-advance-edit): Remove. | ||
| 8 | |||
| 1 | 2005-04-18 Kim F. Storm <storm@cua.dk> | 9 | 2005-04-18 Kim F. Storm <storm@cua.dk> |
| 2 | 10 | ||
| 3 | * emulation/cua-base.el (cua--pre-command-handler): Add more | 11 | * emulation/cua-base.el (cua--pre-command-handler): Add more |
| @@ -11,8 +19,8 @@ | |||
| 11 | 19 | ||
| 12 | * tooltip.el (tooltip-show): Change second arg to USE-ECHO-AREA | 20 | * tooltip.el (tooltip-show): Change second arg to USE-ECHO-AREA |
| 13 | and make it optional. Don't test tooltip-gud-echo-area here. | 21 | and make it optional. Don't test tooltip-gud-echo-area here. |
| 14 | (tooltip-gud-process-output, gdb-tooltip-print): Pass | 22 | (tooltip-gud-process-output, gdb-tooltip-print): |
| 15 | tooltip-gud-echo-area to tooltip-show. | 23 | Pass tooltip-gud-echo-area to tooltip-show. |
| 16 | (tooltip-help-tips): Remove second optional arg to tooltip-show. | 24 | (tooltip-help-tips): Remove second optional arg to tooltip-show. |
| 17 | 25 | ||
| 18 | 2005-04-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | 26 | 2005-04-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> |
diff --git a/lisp/isearch.el b/lisp/isearch.el index dfd50b2a8a1..e01f2c0c0ec 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -405,12 +405,6 @@ A value of nil means highlight all matches." | |||
| 405 | (let ((map (make-sparse-keymap))) | 405 | (let ((map (make-sparse-keymap))) |
| 406 | (set-keymap-parent map minibuffer-local-map) | 406 | (set-keymap-parent map minibuffer-local-map) |
| 407 | (define-key map "\r" 'isearch-nonincremental-exit-minibuffer) | 407 | (define-key map "\r" 'isearch-nonincremental-exit-minibuffer) |
| 408 | (define-key map "\M-n" 'isearch-ring-advance-edit) | ||
| 409 | (define-key map [next] 'isearch-ring-advance-edit) | ||
| 410 | (define-key map [down] 'isearch-ring-advance-edit) | ||
| 411 | (define-key map "\M-p" 'isearch-ring-retreat-edit) | ||
| 412 | (define-key map [prior] 'isearch-ring-retreat-edit) | ||
| 413 | (define-key map [up] 'isearch-ring-retreat-edit) | ||
| 414 | (define-key map "\M-\t" 'isearch-complete-edit) | 408 | (define-key map "\M-\t" 'isearch-complete-edit) |
| 415 | (define-key map "\C-s" 'isearch-forward-exit-minibuffer) | 409 | (define-key map "\C-s" 'isearch-forward-exit-minibuffer) |
| 416 | (define-key map "\C-r" 'isearch-reverse-exit-minibuffer) | 410 | (define-key map "\C-r" 'isearch-reverse-exit-minibuffer) |
| @@ -937,8 +931,6 @@ The following additional command keys are active while editing. | |||
| 937 | \\[isearch-nonincremental-exit-minibuffer] to do one nonincremental search. | 931 | \\[isearch-nonincremental-exit-minibuffer] to do one nonincremental search. |
| 938 | \\[isearch-forward-exit-minibuffer] to resume isearching forward. | 932 | \\[isearch-forward-exit-minibuffer] to resume isearching forward. |
| 939 | \\[isearch-reverse-exit-minibuffer] to resume isearching backward. | 933 | \\[isearch-reverse-exit-minibuffer] to resume isearching backward. |
| 940 | \\[isearch-ring-advance-edit] to replace the search string with the next item in the search ring. | ||
| 941 | \\[isearch-ring-retreat-edit] to replace the search string with the previous item in the search ring. | ||
| 942 | \\[isearch-complete-edit] to complete the search string using the search ring. | 934 | \\[isearch-complete-edit] to complete the search string using the search ring. |
| 943 | \\<isearch-mode-map> | 935 | \\<isearch-mode-map> |
| 944 | If first char entered is \\[isearch-yank-word-or-char], then do word search instead." | 936 | If first char entered is \\[isearch-yank-word-or-char], then do word search instead." |
| @@ -1024,12 +1016,12 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst | |||
| 1024 | (isearch-unread e)) | 1016 | (isearch-unread e)) |
| 1025 | (setq cursor-in-echo-area nil) | 1017 | (setq cursor-in-echo-area nil) |
| 1026 | (setq isearch-new-string | 1018 | (setq isearch-new-string |
| 1027 | (let (junk-ring) | 1019 | (read-from-minibuffer |
| 1028 | (read-from-minibuffer | 1020 | (isearch-message-prefix nil nil isearch-nonincremental) |
| 1029 | (isearch-message-prefix nil nil isearch-nonincremental) | 1021 | isearch-string |
| 1030 | isearch-string | 1022 | minibuffer-local-isearch-map nil |
| 1031 | minibuffer-local-isearch-map nil | 1023 | (if isearch-regexp 'regexp-search-ring 'search-ring) |
| 1032 | 'junk-ring nil t)) | 1024 | nil t) |
| 1033 | isearch-new-message | 1025 | isearch-new-message |
| 1034 | (mapconcat 'isearch-text-char-description | 1026 | (mapconcat 'isearch-text-char-description |
| 1035 | isearch-new-string ""))) | 1027 | isearch-new-string ""))) |
| @@ -1860,49 +1852,6 @@ Obsolete." | |||
| 1860 | (interactive) | 1852 | (interactive) |
| 1861 | (isearch-ring-adjust nil)) | 1853 | (isearch-ring-adjust nil)) |
| 1862 | 1854 | ||
| 1863 | (defun isearch-ring-advance-edit (n) | ||
| 1864 | "Insert the next element of the search history into the minibuffer. | ||
| 1865 | With prefix arg N, insert the Nth element." | ||
| 1866 | (interactive "p") | ||
| 1867 | (let* ((yank-pointer-name (if isearch-regexp | ||
| 1868 | 'regexp-search-ring-yank-pointer | ||
| 1869 | 'search-ring-yank-pointer)) | ||
| 1870 | (yank-pointer (eval yank-pointer-name)) | ||
| 1871 | (ring (if isearch-regexp regexp-search-ring search-ring)) | ||
| 1872 | (length (length ring))) | ||
| 1873 | (if (zerop length) | ||
| 1874 | () | ||
| 1875 | (set yank-pointer-name | ||
| 1876 | (setq yank-pointer | ||
| 1877 | (mod (- (or yank-pointer 0) n) | ||
| 1878 | length))) | ||
| 1879 | |||
| 1880 | (delete-field) | ||
| 1881 | (insert (nth yank-pointer ring)) | ||
| 1882 | (goto-char (point-max))))) | ||
| 1883 | |||
| 1884 | (defun isearch-ring-retreat-edit (n) | ||
| 1885 | "Insert the previous element of the search history into the minibuffer. | ||
| 1886 | With prefix arg N, insert the Nth element." | ||
| 1887 | (interactive "p") | ||
| 1888 | (isearch-ring-advance-edit (- n))) | ||
| 1889 | |||
| 1890 | ;;(defun isearch-ring-adjust-edit (advance) | ||
| 1891 | ;; "Use the next or previous search string in the ring while in minibuffer." | ||
| 1892 | ;; (isearch-ring-adjust1 advance) | ||
| 1893 | ;; (erase-buffer) | ||
| 1894 | ;; (insert isearch-string)) | ||
| 1895 | |||
| 1896 | ;;(defun isearch-ring-advance-edit () | ||
| 1897 | ;; (interactive) | ||
| 1898 | ;; (isearch-ring-adjust-edit 'advance)) | ||
| 1899 | |||
| 1900 | ;;(defun isearch-ring-retreat-edit () | ||
| 1901 | ;; "Retreat to the previous search string in the ring while in the minibuffer." | ||
| 1902 | ;; (interactive) | ||
| 1903 | ;; (isearch-ring-adjust-edit nil)) | ||
| 1904 | |||
| 1905 | |||
| 1906 | (defun isearch-complete1 () | 1855 | (defun isearch-complete1 () |
| 1907 | ;; Helper for isearch-complete and isearch-complete-edit | 1856 | ;; Helper for isearch-complete and isearch-complete-edit |
| 1908 | ;; Return t if completion OK, nil if no completion exists. | 1857 | ;; Return t if completion OK, nil if no completion exists. |