From xemacs-m  Wed Jun  4 18:47:38 1997
Received: from jagor.srce.hr (hniksic@jagor.srce.hr [161.53.2.130])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id SAA01107
	for <xemacs-beta@xemacs.org>; Wed, 4 Jun 1997 18:47:36 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id BAA05837; Thu, 5 Jun 1997 01:47:33 +0200 (MET DST)
To: Gary.Foster@Corp.Sun.COM (Gary D. Foster)
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> <bciwwoaowwz.fsf@corp.Sun.COM>
X-Attribution: Hrv
X-Face: Mie8:rOV<\c/~z{s.X4A{!?vY7{drJ([U]0O=W/<W*SMo/Mv:58:*_y~ki>xDi&N7XG
        KV^$k0m3Oe/)'e%3=$PCR&3ITUXH,cK>]bci&<qQ>Ff%x_>1`T(+M2Gg/fgndU%k*ft
        [(7._6e0n-V%|%'[c|q:;}td$#INd+;?!-V=c8Pqf}3J
From: Hrvoje Niksic <hniksic@srce.hr>
Date: 05 Jun 1997 01:47:32 +0200
In-Reply-To: Gary.Foster@Corp.Sun.COM's message of 04 Jun 1997 14:55:40 -0700
Message-ID: <kig4tberkvf.fsf@jagor.srce.hr>
Lines: 103
X-Mailer: Gnus v5.4.52/XEmacs 20.3(beta3)

Gary.Foster@Corp.Sun.COM (Gary D. Foster) 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

Yes, but \177 is turned to delete.  Which is in turn output as DEL.
Look at the source.

> (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.

Have you tested this example?  In 20.3-b3, the above form makes every
pressing of the grey key go beep for me.

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

OK.  I just wanted to clarify that, not to insult you.

I really believe that \177 should be mapped to delete by default --
but via `function-key-map'.  On TTY-s with tty-erase-char other than
?\C-h, it should be mapped to backspace; again, via
`function-key-map'.

This is a slightly different approach, but I believe it should do
well.  What do you think?

> 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.

OK, now I've allowed myself to get involved in it too (also perhaps
stupidly). :-)

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

Or backspace, IMHO.

> 	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)

I believe everyone wants the key above enter to delieve backwards, and 
the one right to it (if he/she has it) forwards.  If there are those
who violate it, we'll deal with them. :-)

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

Yes, that is very lousy.  I'm not sure how to deal with it.  It's also 
not in accordance with my previous claims about \177 generating
backspace when tty-erase-char is other than C-h.

> > 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>?

The cited thing.  I just wanted to ask whether such a design is a Good
Thing (no, I didn't mean to get personal; I'm not Erik).

I'd prefer delete (or whatever) being bound to delete-forward and
backspace to delete-backward, provided I have both keysyms.  Since I
don't, the next-of-kin choice is to bind backspace to /dev/null and
delete to delete-backwards.

I notice that your scheme doesn't work that way, and I'd like to ask
why -- without *ever* wanting to "cut it to shreds."

[... DEL works everywhere ...]
> What am I failing to understand here?

The only thing you fail to understand is exactly what I mean.  I hope
this message of mine was sufficiently clear.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
4.  Thou shalt not warlorde a sig if it bee the sig of Kibo, nor if
    it bee the sig of the Inner Circle.

