From xemacs-m  Wed Jun  4 22:09:02 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 WAA17455
	for <xemacs-beta@xemacs.org>; Wed, 4 Jun 1997 22:09:01 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id FAA21378; Thu, 5 Jun 1997 05:08:58 +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> <kig4tberkvf.fsf@jagor.srce.hr> <bcizpt5oqvh.fsf@corp.Sun.COM> <kigwwo9ritd.fsf@jagor.srce.hr> <bcilo4pold3.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 05:08:57 +0200
In-Reply-To: Gary.Foster@Corp.Sun.COM's message of 04 Jun 1997 19:05:12 -0700
Message-ID: <kigoh9lrbjq.fsf@jagor.srce.hr>
Lines: 53
X-Mailer: Gnus v5.4.52/XEmacs 20.3(beta3)

Gary.Foster@Corp.Sun.COM (Gary D. Foster) writes:

> Actually, the key above enter (backspace on my keyboard) should
> generate backspace.

Then we're talking about solution b), not c).  It kinda obviates the
need for a `backspace-or-delete'.

Note that on TTY-s we shift our notion on what backspace is by using
`tty-erase-char' magic.  On X we do it with `x-keysym-on-keyboard-p'.

> (define-key global-map 'delete (if (xkeysym-check)
>                                    'backspace-or-delete
>                                  'backwards-delete-char))

Yes, but this scheme fails on TTY-s.  Yes, I know -- you'll deal with
TTY-s later.  But it will be a poor consolation if your perfect scheme
fails because you didn't think of TTY-s at the time.

Why will it fail on TTY-s?  Because global-map is not console-local,
that's why.

> This would result in the DEL key being mapped automatically to the
> right function if they don't have a BS key, and wouldn't incur the
> overhead of the keysym check every single time they invoke the b-or-d
> function.  -OR-, instead of the above, I could also just translate DEL 
> to BS if they don't have a BS key and then the whole issue becomes
> moot.

Yes, I think that's the favorable solution.  But now I contradict
myself, because I wanted a solution that runs the existing code
well. :-(

> > With my approach b) implemented, I really think we could map the
> > delete key to 'delete-char.  I am prepared to die.
> 
> That's admirable, however, it's unnecessary and unacceptable.  I think 
> that (as you stated) with sol'n C we can satisfy everyone with the
> functionality necessary.  I promise to not take away your DEL
> key. :)

I'll bind it to backspace, once I'm sure you haven't Ruined
Everything. :-)

[... what \177 will generate ...]
> I think it should set it to 'delete, as in case b.

No.  In case b) it gets translated in a console-local thing.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
I'm a Lisp variable -- bind me!

