emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r112866: * isearch.el (isearch-allow-


From: Alan Mackenzie
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r112866: * isearch.el (isearch-allow-prefix): New user option.
Date: Wed, 05 Jun 2013 20:57:09 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 112866
committer: Alan Mackenzie <address@hidden>
branch nick: trunk
timestamp: Wed 2013-06-05 20:57:09 +0000
message:
          * 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.
modified:
  doc/emacs/ChangeLog
  doc/emacs/emacs.texi
  doc/emacs/search.texi
  etc/NEWS
  lisp/ChangeLog
  lisp/isearch.el
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2013-06-03 23:34:27 +0000
+++ b/doc/emacs/ChangeLog       2013-06-05 20:57:09 +0000
@@ -1,3 +1,9 @@
+2013-06-05  Alan Mackenzie  <address@hidden>
+
+       * search.texi (Isearch Scroll): Rename to "Not Exiting Isearch".
+       (Net Exiting Isearch): Document new user option
+       `isearch-allow-prefix'.
+
 2013-06-03  Juri Linkov  <address@hidden>
 
        * display.texi (Highlight Interactively): Add global keybindings

=== modified file 'doc/emacs/emacs.texi'
--- a/doc/emacs/emacs.texi      2013-03-30 16:47:07 +0000
+++ b/doc/emacs/emacs.texi      2013-06-05 20:57:09 +0000
@@ -396,14 +396,14 @@
 
 Incremental Search
 
-* Basic Isearch::       Basic incremental search commands.
-* Repeat Isearch::      Searching for the same string again.
-* Error in Isearch::    When your string is not found.
-* Special Isearch::     Special input in incremental search.
-* Isearch Yank::        Commands that grab text into the search string
-                          or else edit the search string.
-* Isearch Scroll::      Scrolling during an incremental search.
-* Isearch Minibuffer::  Incremental search of the minibuffer history.
+* Basic Isearch::        Basic incremental search commands.
+* Repeat Isearch::       Searching for the same string again.
+* Error in Isearch::     When your string is not found.
+* Special Isearch::      Special input in incremental search.
+* Isearch Yank::         Commands that grab text into the search string
+                           or else edit the search string.
+* Not Exiting Isearch::  Prefix argument and scrolling commands.
+* Isearch Minibuffer::   Incremental search of the minibuffer history.
 
 Replacement Commands
 

=== modified file 'doc/emacs/search.texi'
--- a/doc/emacs/search.texi     2013-05-15 23:14:18 +0000
+++ b/doc/emacs/search.texi     2013-06-05 20:57:09 +0000
@@ -52,14 +52,14 @@
 @end table
 
 @menu
-* Basic Isearch::       Basic incremental search commands.
-* Repeat Isearch::      Searching for the same string again.
-* Error in Isearch::    When your string is not found.
-* Special Isearch::     Special input in incremental search.
-* Isearch Yank::        Commands that grab text into the search string
-                          or else edit the search string.
-* Isearch Scroll::      Scrolling during an incremental search.
-* Isearch Minibuffer::  Incremental search of the minibuffer history.
+* Basic Isearch::        Basic incremental search commands.
+* Repeat Isearch::       Searching for the same string again.
+* Error in Isearch::     When your string is not found.
+* Special Isearch::      Special input in incremental search.
+* Isearch Yank::         Commands that grab text into the search string
+                           or else edit the search string.
+* Not Exiting Isearch::  Prefix argument and scrolling commands.
+* Isearch Minibuffer::   Incremental search of the minibuffer history.
 @end menu
 
 @node Basic Isearch
@@ -332,9 +332,28 @@
 minibuffer with @kbd{M-e} (@pxref{Repeat Isearch}) and type @kbd{C-f}
 at the end of the search string in the minibuffer.
 
address@hidden Isearch Scroll
address@hidden Scrolling During Incremental Search
-
address@hidden Not Exiting Isearch
address@hidden Not Exiting Incremental Search
+
+This subsection describes two categories of commands which you can
+type without exiting the current incremental search, even though they
+are not themselves part of incremental search.
+
address@hidden @asis
address@hidden Prefix Arguments
address@hidden isearch-allow-prefix
+  In incremental search, when you enter a prefix argument
+(@pxref{Arguments}), by default it will apply either to the next
+action in the search or to the command that exits the search.
+
+  In previous versions of Emacs, entering a prefix argument always
+terminated the search.  You can revert to this behavior by setting the
+variable @code{isearch-allow-prefix} to @code{nil}.
+
+  When @code{isearch-allow-scroll} is address@hidden (see below),
+prefix arguments always have the default behavior described above.
+
address@hidden Scrolling Commands
 @vindex isearch-allow-scroll
   Normally, scrolling commands exit incremental search.  If you change
 the variable @code{isearch-allow-scroll} to a address@hidden value,
@@ -366,6 +385,7 @@
 change point, the buffer contents, the match data, the current buffer,
 or the selected window and frame.  The command must not itself attempt
 an incremental search.
address@hidden table
 
 @node Isearch Minibuffer
 @subsection Searching the Minibuffer

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2013-06-05 18:31:48 +0000
+++ b/etc/NEWS  2013-06-05 20:57:09 +0000
@@ -292,6 +292,10 @@
 *** `query-replace' skips invisible text when `search-invisible' is nil,
 and opens overlays with hidden text when `search-invisible' is `open'.
 
++++
+*** By default, prefix arguments do not now terminate Isearch mode.
+Set `isearch-allow-prefix' to nil to restore old behavior.
+
 ** MH-E has been updated to MH-E version 8.5.
 See MH-E-NEWS for details.
 

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2013-06-05 19:57:10 +0000
+++ b/lisp/ChangeLog    2013-06-05 20:57:09 +0000
@@ -1,3 +1,9 @@
+2013-06-05  Alan Mackenzie  <address@hidden>
+
+       * 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.
+
 2013-06-05  Stefan Monnier  <address@hidden>
 
        * autorevert.el (auto-revert-notify-handler): Use memq.

=== modified file 'lisp/isearch.el'
--- a/lisp/isearch.el   2013-06-03 08:51:50 +0000
+++ b/lisp/isearch.el   2013-06-05 20:57:09 +0000
@@ -2152,6 +2152,14 @@
   :type 'boolean
   :group 'isearch)
 
+(defcustom isearch-allow-prefix t
+  "Whether prefix arguments are allowed during incremental search.
+If non-nil, entering a prefix argument will not terminate the
+search.  This option is ignored \(presumed t) when
+`isearch-allow-scroll' is set."
+  :type 'boolean
+  :group 'isearch)
+
 (defun isearch-string-out-of-window (isearch-point)
   "Test whether the search string is currently outside of the window.
 Return nil if it's completely visible, or if point is visible,
@@ -2304,12 +2312,19 @@
           (setq prefix-arg arg)
           (apply 'isearch-unread keylist)
           (isearch-edit-string))
-          ;; Handle a scrolling function.
-          ((and isearch-allow-scroll
-                (progn (setq key (isearch-reread-key-sequence-naturally 
keylist))
-                       (setq keylist (listify-key-sequence key))
-                       (setq main-event (aref key 0))
-                       (setq scroll-command (isearch-lookup-scroll-key key))))
+          ;; Handle a scrolling function or prefix argument.
+          ((progn
+            (setq key (isearch-reread-key-sequence-naturally keylist)
+                  keylist (listify-key-sequence key)
+                  main-event (aref key 0))
+            (or (and isearch-allow-scroll
+                     (setq scroll-command (isearch-lookup-scroll-key key)))
+                (and isearch-allow-prefix
+                     (let (overriding-terminal-local-map)
+                       (setq scroll-command (key-binding key))
+                       (memq scroll-command
+                             '(universal-argument
+                               negative-argument digit-argument))))))
            ;; From this point onwards, KEY, KEYLIST and MAIN-EVENT hold a
            ;; complete key sequence, possibly as modified by function-key-map,
            ;; not merely the one or two event fragment which invoked


reply via email to

[Prev in Thread] Current Thread [Next in Thread]