public inbox for insight@sourceware.org
 help / color / mirror / Atom feed
From: Tom Tromey <tromey@cygnus.com>
To: Insight List <insight@sourceware.cygnus.com>
Subject: M-b
Date: Mon, 22 May 2000 13:19:00 -0000	[thread overview]
Message-ID: <87aehimj66.fsf@cygnus.com> (raw)

Bring up the Console.  Hit Meta-b.
Note that the cursor appears in the prompt.  Oops.

I looked at this a bit.  It seems like the appended patch should fix
the problem, but it doesn't.

Experimentation at runtime shows that the Text binding is being run
even though my new binding invokes "break".

I have no clue why this would fail.  In the past I would have
suspected our weird itcl, but I haven't kept up with what has happened
there and I don't know if these suspicions are still current.

Perhaps someone with more time and more recent direct experience could
finish this?  It shouldn't take too long...


2000-05-22  Tom Tromey  <tromey@cygnus.com>

	* console.itb (Console::_build_win): Handle bindings which
	are ";".  Also, completely override underlying Text binding.

Tom

Index: console.itb
===================================================================
RCS file: /cvs/src/src/gdb/gdbtk/library/console.itb,v
retrieving revision 1.3
diff -u -r1.3 console.itb
--- console.itb	2000/04/14 14:45:37	1.3
+++ console.itb	2000/05/22 20:17:29
@@ -97,7 +97,7 @@
     %W delete {cmdmark + 1 char} insert
     %W see {insert linestart}
   }
-  
+
   # Control-w deletes previous word.
   bind_plain_key $_twin Control-w {
     if {[%W compare {insert -1c wordstart} > cmdmark]} {
@@ -116,13 +116,19 @@
   # movement.  We only need to do this after events we do not
   # explicitly override.  Note that since the edit line is always the
   # last line, we can't possibly go past it, so we don't bother
-  # checking that.
+  # checking that.  Note also that we check for a binding which is
+  # simply `;'; this lets us handle keys already bound via
+  # bind_plain_key.
   foreach event [bind Text] {
-    if {[string match *Key* $event] && [bind $_twin $event] == ""} {
-      bind $_twin $event {
+    if {[string match *Key* $event]
+	&& ([bind $_twin $event] == ""
+	    || [bind $_twin $event] == ";")} {
+      bind $_twin $event [bind Text $event]
+      bind $_twin $event {+
 	if {[%W compare insert <= {cmdmark + 1 char}]} {
 	  %W mark set insert {cmdmark + 1 char}
 	}
+	break
       }
     }
   }

                 reply	other threads:[~2000-05-22 13:19 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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

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

  git send-email \
    --in-reply-to=87aehimj66.fsf@cygnus.com \
    --to=tromey@cygnus.com \
    --cc=insight@sourceware.cygnus.com \
    /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.
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).