aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Mackenzie2013-06-05 20:57:09 +0000
committerAlan Mackenzie2013-06-05 20:57:09 +0000
commit80fa505f891b420e27f56746d41f51aa5b9d7d51 (patch)
treedfbe3eb6e1b4f7a54ffce956f4888b30103a9a2e
parent817ebfcfde1a40283c173a87ffbe0c1f5cf7ab3a (diff)
downloademacs-80fa505f891b420e27f56746d41f51aa5b9d7d51.tar.gz
emacs-80fa505f891b420e27f56746d41f51aa5b9d7d51.zip
* isearch.el (isearch-allow-prefix): New user option.
(isearch-other-meta-char): don't exit isearch when a prefix argument is typed whilst `isearch-allow-prefix' is non-nil. * search.texi (Isearch Scroll): Rename to "Not Exiting Isearch". (Net Exiting Isearch): Document new user option `isearch-allow-prefix'. * etc/NEWS. Entry for this change.
-rw-r--r--doc/emacs/ChangeLog6
-rw-r--r--doc/emacs/emacs.texi16
-rw-r--r--doc/emacs/search.texi40
-rw-r--r--etc/NEWS4
-rw-r--r--lisp/ChangeLog6
-rw-r--r--lisp/isearch.el27
6 files changed, 75 insertions, 24 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index a700f225a79..f384a0639d8 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,9 @@
12013-06-05 Alan Mackenzie <acm@muc.de>
2
3 * search.texi (Isearch Scroll): Rename to "Not Exiting Isearch".
4 (Net Exiting Isearch): Document new user option
5 `isearch-allow-prefix'.
6
12013-06-03 Juri Linkov <juri@jurta.org> 72013-06-03 Juri Linkov <juri@jurta.org>
2 8
3 * display.texi (Highlight Interactively): Add global keybindings 9 * display.texi (Highlight Interactively): Add global keybindings
diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi
index d2ec2154024..e2d0b0eebf6 100644
--- a/doc/emacs/emacs.texi
+++ b/doc/emacs/emacs.texi
@@ -396,14 +396,14 @@ Searching and Replacement
396 396
397Incremental Search 397Incremental Search
398 398
399* Basic Isearch:: Basic incremental search commands. 399* Basic Isearch:: Basic incremental search commands.
400* Repeat Isearch:: Searching for the same string again. 400* Repeat Isearch:: Searching for the same string again.
401* Error in Isearch:: When your string is not found. 401* Error in Isearch:: When your string is not found.
402* Special Isearch:: Special input in incremental search. 402* Special Isearch:: Special input in incremental search.
403* Isearch Yank:: Commands that grab text into the search string 403* Isearch Yank:: Commands that grab text into the search string
404 or else edit the search string. 404 or else edit the search string.
405* Isearch Scroll:: Scrolling during an incremental search. 405* Not Exiting Isearch:: Prefix argument and scrolling commands.
406* Isearch Minibuffer:: Incremental search of the minibuffer history. 406* Isearch Minibuffer:: Incremental search of the minibuffer history.
407 407
408Replacement Commands 408Replacement Commands
409 409
diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi
index e146177255e..ead7c3cbf16 100644
--- a/doc/emacs/search.texi
+++ b/doc/emacs/search.texi
@@ -52,14 +52,14 @@ Incremental search backward (@code{isearch-backward}).
52@end table 52@end table
53 53
54@menu 54@menu
55* Basic Isearch:: Basic incremental search commands. 55* Basic Isearch:: Basic incremental search commands.
56* Repeat Isearch:: Searching for the same string again. 56* Repeat Isearch:: Searching for the same string again.
57* Error in Isearch:: When your string is not found. 57* Error in Isearch:: When your string is not found.
58* Special Isearch:: Special input in incremental search. 58* Special Isearch:: Special input in incremental search.
59* Isearch Yank:: Commands that grab text into the search string 59* Isearch Yank:: Commands that grab text into the search string
60 or else edit the search string. 60 or else edit the search string.
61* Isearch Scroll:: Scrolling during an incremental search. 61* Not Exiting Isearch:: Prefix argument and scrolling commands.
62* Isearch Minibuffer:: Incremental search of the minibuffer history. 62* Isearch Minibuffer:: Incremental search of the minibuffer history.
63@end menu 63@end menu
64 64
65@node Basic Isearch 65@node Basic Isearch
@@ -332,9 +332,28 @@ alternative method to add the character after point is to enter the
332minibuffer with @kbd{M-e} (@pxref{Repeat Isearch}) and type @kbd{C-f} 332minibuffer with @kbd{M-e} (@pxref{Repeat Isearch}) and type @kbd{C-f}
333at the end of the search string in the minibuffer. 333at the end of the search string in the minibuffer.
334 334
335@node Isearch Scroll 335@node Not Exiting Isearch
336@subsection Scrolling During Incremental Search 336@subsection Not Exiting Incremental Search
337 337
338This subsection describes two categories of commands which you can
339type without exiting the current incremental search, even though they
340are not themselves part of incremental search.
341
342@table @asis
343@item Prefix Arguments
344@vindex isearch-allow-prefix
345 In incremental search, when you enter a prefix argument
346(@pxref{Arguments}), by default it will apply either to the next
347action in the search or to the command that exits the search.
348
349 In previous versions of Emacs, entering a prefix argument always
350terminated the search. You can revert to this behavior by setting the
351variable @code{isearch-allow-prefix} to @code{nil}.
352
353 When @code{isearch-allow-scroll} is non-@code{nil} (see below),
354prefix arguments always have the default behavior described above.
355
356@item Scrolling Commands
338@vindex isearch-allow-scroll 357@vindex isearch-allow-scroll
339 Normally, scrolling commands exit incremental search. If you change 358 Normally, scrolling commands exit incremental search. If you change
340the variable @code{isearch-allow-scroll} to a non-@code{nil} value, 359the variable @code{isearch-allow-scroll} to a non-@code{nil} value,
@@ -366,6 +385,7 @@ This feature can be applied to any command that doesn't permanently
366change point, the buffer contents, the match data, the current buffer, 385change point, the buffer contents, the match data, the current buffer,
367or the selected window and frame. The command must not itself attempt 386or the selected window and frame. The command must not itself attempt
368an incremental search. 387an incremental search.
388@end table
369 389
370@node Isearch Minibuffer 390@node Isearch Minibuffer
371@subsection Searching the Minibuffer 391@subsection Searching the Minibuffer
diff --git a/etc/NEWS b/etc/NEWS
index 0b533efe163..8732ffa2fcd 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -292,6 +292,10 @@ when it's nil).
292*** `query-replace' skips invisible text when `search-invisible' is nil, 292*** `query-replace' skips invisible text when `search-invisible' is nil,
293and opens overlays with hidden text when `search-invisible' is `open'. 293and opens overlays with hidden text when `search-invisible' is `open'.
294 294
295+++
296*** By default, prefix arguments do not now terminate Isearch mode.
297Set `isearch-allow-prefix' to nil to restore old behavior.
298
295** MH-E has been updated to MH-E version 8.5. 299** MH-E has been updated to MH-E version 8.5.
296See MH-E-NEWS for details. 300See MH-E-NEWS for details.
297 301
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7de7b079570..f40a23a5035 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,9 @@
12013-06-05 Alan Mackenzie <acm@muc.de>
2
3 * isearch.el (isearch-allow-prefix): New user option.
4 (isearch-other-meta-char): don't exit isearch when a prefix
5 argument is typed whilst `isearch-allow-prefix' is non-nil.
6
12013-06-05 Stefan Monnier <monnier@iro.umontreal.ca> 72013-06-05 Stefan Monnier <monnier@iro.umontreal.ca>
2 8
3 * autorevert.el (auto-revert-notify-handler): Use memq. 9 * autorevert.el (auto-revert-notify-handler): Use memq.
diff --git a/lisp/isearch.el b/lisp/isearch.el
index c49b0d7fc59..e6678d33ea4 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -2152,6 +2152,14 @@ If nil, scrolling commands will first cancel Isearch mode."
2152 :type 'boolean 2152 :type 'boolean
2153 :group 'isearch) 2153 :group 'isearch)
2154 2154
2155(defcustom isearch-allow-prefix t
2156 "Whether prefix arguments are allowed during incremental search.
2157If non-nil, entering a prefix argument will not terminate the
2158search. This option is ignored \(presumed t) when
2159`isearch-allow-scroll' is set."
2160 :type 'boolean
2161 :group 'isearch)
2162
2155(defun isearch-string-out-of-window (isearch-point) 2163(defun isearch-string-out-of-window (isearch-point)
2156 "Test whether the search string is currently outside of the window. 2164 "Test whether the search string is currently outside of the window.
2157Return nil if it's completely visible, or if point is visible, 2165Return nil if it's completely visible, or if point is visible,
@@ -2304,12 +2312,19 @@ Isearch mode."
2304 (setq prefix-arg arg) 2312 (setq prefix-arg arg)
2305 (apply 'isearch-unread keylist) 2313 (apply 'isearch-unread keylist)
2306 (isearch-edit-string)) 2314 (isearch-edit-string))
2307 ;; Handle a scrolling function. 2315 ;; Handle a scrolling function or prefix argument.
2308 ((and isearch-allow-scroll 2316 ((progn
2309 (progn (setq key (isearch-reread-key-sequence-naturally keylist)) 2317 (setq key (isearch-reread-key-sequence-naturally keylist)
2310 (setq keylist (listify-key-sequence key)) 2318 keylist (listify-key-sequence key)
2311 (setq main-event (aref key 0)) 2319 main-event (aref key 0))
2312 (setq scroll-command (isearch-lookup-scroll-key key)))) 2320 (or (and isearch-allow-scroll
2321 (setq scroll-command (isearch-lookup-scroll-key key)))
2322 (and isearch-allow-prefix
2323 (let (overriding-terminal-local-map)
2324 (setq scroll-command (key-binding key))
2325 (memq scroll-command
2326 '(universal-argument
2327 negative-argument digit-argument))))))
2313 ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a 2328 ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a
2314 ;; complete key sequence, possibly as modified by function-key-map, 2329 ;; complete key sequence, possibly as modified by function-key-map,
2315 ;; not merely the one or two event fragment which invoked 2330 ;; not merely the one or two event fragment which invoked