From xemacs-m  Wed Jun  4 16:55:18 1997
Received: from mercury.Sun.COM (mercury.Sun.COM [192.9.25.1])
	by xemacs.org (8.8.5/8.8.5) with SMTP id QAA26800
	for <xemacs-beta@xemacs.org>; Wed, 4 Jun 1997 16:55:17 -0500 (CDT)
Received: from Corp.Sun.COM ([129.145.35.78]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id PAA10792 for <xemacs-beta@xemacs.org>; Wed, 4 Jun 1997 15:13:21 -0700
Received: from legba.Corp.Sun.COM by Corp.Sun.COM (SMI-8.6/SMI-5.3)
	id OAA00206; Wed, 4 Jun 1997 14:55:42 -0700
Received: by legba.Corp.Sun.COM (SMI-8.6/SMI-SVR4)
	id OAA14413; Wed, 4 Jun 1997 14:55:40 -0700
To: Hrvoje Niksic <hniksic@srce.hr>
Cc: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: cc-mode delete behavior [PATCH]
References: <bcipvu2pbof.fsf@corp.Sun.COM> <kiglo4qjjgt.fsf@jagor.srce.hr> <bciiuzuqjae.fsf@corp.Sun.COM> <kighgfejhf5.fsf@jagor.srce.hr> <bci67vuqdvs.fsf@corp.Sun.COM> <kig67vurrpn.fsf@jagor.srce.hr>
X-Attribution: GDF
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
From: Gary.Foster@Corp.Sun.COM (Gary D. Foster)
Date: 04 Jun 1997 14:55:40 -0700
In-Reply-To: Hrvoje Niksic's message of 04 Jun 1997 23:19:48 +0200
Message-ID: <bciwwoaowwz.fsf@corp.Sun.COM>
Lines: 125
X-Mailer: Gnus v5.4.55/XEmacs 20.3(beta3)

Hrvoje Niksic <hniksic@srce.hr> writes:

> I beg to differ.  On TTY-s, it generates either \177 or \008, and on X 
> it generates either the Delete or BackSpace event.

So you're telling me that:

(define-key global-map "\177" 'foo)

C-h c <push the delete key>

DEL runs the command foo

Doesn't work on your system, with a plain vanilla xemacs -q
invocation?  It does on the half a dozen machines I've tested it on
here at work as well as the three sparc linux boxes, this Solaris box, 
and the intel PC I've tested it on at home, in tty mode as well as X
mode.

(define-key global-map 'delete 'foo)

Doesn't change anything.  I'll gladly accept the fact that the DEL key 
*should* generate a 'delete, and that doing the second define-key
above SHOULD be the proper way to bind 'foo to the DEL key, but it's
not the way it is right now.

> So, I'll ask once again: do your DEL examples mean \177 or delete?

\177, as I've stated.  binding 'delete to 'foo, as I stated, doesn't
exhibit the behavior that  binding "\177" to 'foo does, and, as I
stated, if we change the function key mapping I'll GLADLY change all
my references from "\177" to 'delete and walk away passively.

> > (define-key hrvoje-map 'hrvoje-super-delete)
> 
> But where is the key?  That was the main part of the question! :-)

(define-key hrvoje-map "\177" 'hrvoje-super-delete), sorry, I was in a 
hurry and forgot that part.  As I said, I'll gladly s/"\177"/'delete/g 
depending on the outcome of all the debate but right now it doesn't
work if I use 'delete instead of "\177".

> 
> My inquiries are not personal attacks against you.  I'd just like to
> discuss the concepts you introduce with you and all the others.  You
> are biased, as the author. :-)

Yes, I agree I'm biased, and I guess the aggravation I'm exhibiting
stems from a couple of sources...

1) Lots of people have complained, and I'm busting my butt to try and
   make it work without breaking any code, and all the criticisms I've 
   gotten so far all seem to say "that's not the way I would have done 
   it" when in fact nobody wanted to *touch* the issue until I
   (perhaps stupidly???) allowed myself to be volunteered for it.

2) You have shredded my solution time after time and are just now
   beginning to actually investigate how it works.  That was partially 
   my fault for explaining it poorly at the beginning, but also due
   partially to the fact that we actually have three issues at stake
   and they are getting all lumped into the same argument/discussion.
   These three issues are:

	pressing the "del" key is currently tied to "\177" when it
	(probably) should be tied to 'delete.

	Some people want the "del" key to erase backwards, (generally
	the old-timers) while others want it to erase forwards
	(generally the new kids on the block)

	the erase key has always been assumed to be the "delete" key
	in tty mode, when it should be configurable as well.

> 
> What I meant is, in message-mode (or whatever):
> 
>     DEL runs the command backspace-or-delete
> 
> See?

I get that exact behavior now in every mode that doesn't explicity
override it (currently cc-mode, cperl, and VM override it with their
own keymappings).

What happens when YOU type C-h c <the key formerly known as delete>?

I get (in message-mode, emacs-lisp mode, ada mode, etc. etc. etc)

DEL runs the command backspace-or-delete

In cc-mode I get

DEL runs the command c-electric-delete

and in cperl-mode I get

DEL runs the command cperl-electric-backspace

In *ALL* of these above modes, if delete-erases-forward=nil pressing
"del" erases to the left, and if delete-erases-forward=t it erases to
the right.  I believe that's the logical, expected, and desired
behavior.  I also get this behavior in tty mode, as well as X on all
the platforms I currently have access to.

Additionally, in VM mode I get

DEL runs the command vm-scroll-backwards

Which, again, I believe is the expected and desired behavior.

What am I failing to understand here?  I'm perfectly willing to admit
that I may not understand something but I do believe that so far
everything I've done has met all the design goals, including
maintaining 100% backwards compatibility.  Can you show me something
that is broken by my changes so that I can understand your objections
and maybe, just possibly, we can get on the same page?

In addition, can we confine the discussion of my changes to _just_ the 
delete key since I haven't touched anything else yet?  That should, I
hope, limit my frustration level just a bit and prevent the issue from 
getting clouded by all sorts of extraneous stuff.  I'd *really* like
to put the delete key handling to rest right now so we can tackle the
harder stuff that we've already also discussed.

-- Gary F.

