From xemacs-m  Fri May 16 20:54:05 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 UAA26475
	for <xemacs-beta@xemacs.org>; Fri, 16 May 1997 20:54:04 -0500 (CDT)
Received: from Corp.Sun.COM ([129.145.35.78]) by mercury.Sun.COM (SMI-8.6/mail.byaddr) with SMTP id TAA27956; Fri, 16 May 1997 19:07:31 -0700
Received: from legba.Corp.Sun.COM by Corp.Sun.COM (SMI-8.6/SMI-5.3)
	id SAA18770; Fri, 16 May 1997 18:54:00 -0700
Received: by legba.Corp.Sun.COM (SMI-8.6/SMI-SVR4)
	id SAA11033; Fri, 16 May 1997 18:53:17 -0700
To: Glynn Clements <glynn@sensei.co.uk>
Cc: XEmacs Developers <xemacs-beta@xemacs.org>
Subject: Re: DEL patch, as promised.
References: <bciaflv2kuv.fsf@corp.Sun.COM> 	<kigiv0jrthb.fsf@jagor.srce.hr> 	<bci67wj2dqa.fsf@corp.Sun.COM> <199705170101.CAA08601@cerise.sensei.co.uk>
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: 16 May 1997 18:53:16 -0700
In-Reply-To: Glynn Clements's message of Sat, 17 May 1997 02:01:43 +0100
Message-ID: <bcivi4i27ar.fsf@corp.Sun.COM>
Lines: 66
X-Mailer: Gnus v5.4.52/XEmacs 20.2

Glynn Clements <glynn@sensei.co.uk> writes:

> Amen. Amen. Amen. Amen.
> 
> > Please *try* out what I've posted and give it a good shakedown before
> > passing judgement.  I've given it a lot of thought and a lot of
> > consideration and I'd take it very kindly if you'd at least give it a
> > good solid perusal and give me real, honest feedback.  It's time we
> > separated the emotions from the issues and got on with fixing it.
> 
> I tried the delete patch; it worked until I loaded a C file, then
> stopped working in all modes. Up until that point it was fine though.

Oh.. duh... I'm an idiot... sheesh.  It helps if I keep it local in
the add-hooks... here, try this:

------------

--- xemacs-20.2/lisp/modes/cc-mode.el	Fri May 16 17:40:58 1997
+++ xemacs-20.2-work/lisp/modes/cc-mode.el	Fri May 16 18:47:01 1997
@@ -1429,8 +1429,8 @@
   (interactive)
   (kill-all-local-variables)
   (make-local-hook 'backspace-or-delete-hook)
-  (add-hook 'backspace-or-delete-hook 'c-electric-delete)
-  (set-syntax-table c-mode-syntax-table)
+  (add-hook 'backspace-or-delete-hook 'c-electric-delete nil t)
+    (set-syntax-table c-mode-syntax-table)
   (setq major-mode 'c-mode
 	mode-name "C"
 	local-abbrev-table c-mode-abbrev-table)
--- xemacs-20.2/lisp/modes/cperl-mode.el	Fri May 16 17:40:59 1997
+++ xemacs-20.2-work/lisp/modes/cperl-mode.el	Fri May 16 18:48:46 1997
@@ -993,7 +993,7 @@
   (interactive)
   (kill-all-local-variables)
   (make-local-hook 'backspace-or-delete-hook)
-  (add-hook 'backspace-or-delete-hook 'cperl-electric-backspace)
+  (add-hook 'backspace-or-delete-hook 'cperl-electric-backspace nil t)
   ;;(if cperl-hairy
   ;;    (progn
   ;;	(cperl-set 'cperl-font-lock cperl-hairy)

-------------

> One idea that occurred to me is to create (virtual?) keysyms for
> `forward-delete' and `backward-delete', and to systematically
> eliminate all references to `delete' or `backspace'.

That occurred to me also, but it kind of scared me to rip it apart
that thoroughly.

> 
> `Delete' is just too ambiguous a term; it could mean the key with
> `Delete' printed on it, the key which generates DEL (which is the <-
> key on my system), or something else altogether.

Yup.

> Also in an attempt to figure out why I can't bind BS and Delete
> seperately on a tty, I stumbled across the `character_to_event'
> function in events.c. This contains the following snippet:

This is a scary bit of code, if you ask me...

-- Gary F.

