From xemacs-m  Mon Jun  2 19:28:02 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 TAA10012
	for <xemacs-beta@xemacs.org>; Mon, 2 Jun 1997 19:28:01 -0500 (CDT)
Received: from Corp.Sun.COM ([129.145.35.78]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id RAA07010; Mon, 2 Jun 1997 17:45:38 -0700
Received: from legba.Corp.Sun.COM by Corp.Sun.COM (SMI-8.6/SMI-5.3)
	id RAA10306; Mon, 2 Jun 1997 17:28:23 -0700
Received: by legba.Corp.Sun.COM (SMI-8.6/SMI-SVR4)
	id RAA05323; Mon, 2 Jun 1997 17:28:21 -0700
To: Martin Buchholz <mrb@Eng.Sun.COM>
Cc: "Barry A. Warsaw" <bwarsaw@python.org>,
        XEmacs Beta Test <xemacs-beta@xemacs.org>
Subject: Re: backspace-or-delete feedback
References: <199706030016.RAA03741@xemacs.eng.sun.com>
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: 02 Jun 1997 17:28:20 -0700
In-Reply-To: Martin Buchholz's message of Mon, 2 Jun 1997 17:16:06 -0700
Message-ID: <bciiuzw7cnv.fsf@corp.Sun.COM>
Lines: 34
X-Mailer: Gnus v5.4.55/XEmacs 20.3(beta3)

Martin Buchholz <mrb@Eng> writes:

> I made the suggested customization to delete-erases-forward to get DEL
> to delete forwards:
> 
> (setq delete-erases-forward t)
> 
> I found it didn't work in cc-mode since it has a
> backspace-or-delete-hook that deletes backward unless further
> customizations are done.  I had to do further customizations for
> cc-mode to get XEmacs to do the Right Thing.  I think it's very
> important that users be able to get consistent backspace/delete
> customization via above *one* line in .emacs, i.e.

Actually, it works, for some definitions of "works".  If, by works,
you mean carries over the same behavior as all other modes than no, it 
does not work... cc-mode specifically overrides the behavior of the
delete key to do a 'c-electric-delete'.  I left the hook in as a proof 
of concept on how to get packages to play nicely with it... I also
used the other method (preferred by Hrovje) in vm to simply
"define-key" override the DEL behavior as another proof of concept.

Ideally, either cc-mode shouldn't override the DEL key behavior *or*
if it is going to override it, it should be smart about it and look to 
see if the user has set delete-erases-forward set to true and behave
accordingly.

I went with the minimum-impact approach and specifically allowed
anyone at anytime to override the DEL key behavior.  Maybe this was a
good thing, maybe it was a bad thing... maybe I should add some checks 
into cc-mode's 'c-electric-delete (and the sibling function in
cperl-mode) to do the checks as a further proof of concept.

-- Gary F.

