unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Dani Moncayo <dmoncayo@gmail.com>
To: Juri Linkov <juri@jurta.org>
Cc: 7534@debbugs.gnu.org
Subject: bug#7534: 24.0.50; G-g within Isearch regexp mode
Date: Mon, 6 Dec 2010 11:41:32 +0100	[thread overview]
Message-ID: <AANLkTi=6D0ecNK84QiZ+P+p1HQNSnf_EpE986bvVOSe6@mail.gmail.com> (raw)
In-Reply-To: <87oc8zhl1e.fsf@mail.jurta.org>

On Mon, Dec 6, 2010 at 00:11, Juri Linkov <juri@jurta.org> wrote:
>> So, IMO, the main principle for C-g (within Isearch mode) should be:
>> * if there is unmatched and/or incomplete input --> Delete it.
>> * Otherwise --> Exit Isearch mode.
>
> Please try the following patch.  Does it provide the behavior
> you are asking for?
>

It does. Thank you.

PS: The patch bellow is like your's, but it also updates the comment
accordingly.


=== modified file 'lisp/isearch.el'
--- lisp/isearch.el	2010-10-16 14:11:06.000000000 +0200
+++ lisp/isearch.el	2010-12-06 11:27:33.000000000 +0100
@@ -1244,9 +1244,9 @@
   (interactive)
 ;;  (ding)  signal instead below, if quitting
   (discard-input)
-  (if isearch-success
-      ;; If search is successful, move back to starting point
-      ;; and really do quit.
+  (if (and isearch-success (not isearch-error))
+      ;; If search is successful and there is no incomplete regexp,
+      ;; move back to starting point and really do quit.
       (progn
         (setq isearch-success nil)
         (isearch-cancel))




-- 
Dani Moncayo





  reply	other threads:[~2010-12-06 10:41 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-02 19:47 bug#7534: 24.0.50; G-g within Isearch regexp mode Dani Moncayo
2010-12-02 22:31 ` Juri Linkov
2010-12-03  7:57   ` Dani Moncayo
2010-12-05 23:11     ` Juri Linkov
2010-12-06 10:41       ` Dani Moncayo [this message]
2010-12-25  2:47         ` Juri Linkov
2011-01-04 11:42           ` Dani Moncayo
2011-01-15  9:57 ` bug#7534: C-g in " Dani Moncayo
2011-01-15 15:51   ` Stefan Monnier
2011-01-16  1:06     ` Juri Linkov
2011-02-04  7:54 ` bug#7534: what about committing the patch also to emacs-23? Dani Moncayo
2011-02-04 14:40   ` Stefan Monnier
2011-02-04 15:39     ` Dani Moncayo

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='AANLkTi=6D0ecNK84QiZ+P+p1HQNSnf_EpE986bvVOSe6@mail.gmail.com' \
    --to=dmoncayo@gmail.com \
    --cc=7534@debbugs.gnu.org \
    --cc=juri@jurta.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).