From xemacs-m  Thu May  1 17:40:47 1997
Received: from altair.xemacs.org (steve@xemacs.miranova.com [206.190.83.19])
	by xemacs.org (8.8.5/8.8.5) with ESMTP id RAA05055
	for <xemacs-beta@xemacs.org>; Thu, 1 May 1997 17:40:46 -0500 (CDT)
Received: (from steve@localhost)
	by altair.xemacs.org (8.8.5/8.8.5) id PAA03422;
	Thu, 1 May 1997 15:42:31 -0700
Mail-Copies-To: never
To: xemacs-beta@xemacs.org
Subject: Re: Patch: cperl-mode.el {C-h} changed to {C-c}
References: <199705012215.PAA03547@bittersweet.inetarena.com> <kig7mhihlr6.fsf@jagor.srce.hr>
X-Url: http://www.miranova.com/%7Esteve/
X-Face: #!T9!#9s-3o8)*uHlX{Ug[xW7E7Wr!*L46-OxqMu\xz23v|R9q}lH?cRS{rCNe^'[`^sr5"
 f8*@r4ipO6Jl!:Ccq<xoV[Qz2u8<8-+Vwf2gzJ44lf_/y9OaQ`@#Q65{U4/TC)i2`~/M&QI$X>p:9I
 OSS'2{-)-4wBnVeg0S\O4Al@)uC[pD|+
X-Attribution: sb
From: Steven L Baur <steve@miranova.com>
In-Reply-To: Hrvoje Niksic's message of 02 May 1997 00:26:37 +0200
Mime-Version: 1.0 (generated by tm-edit 7.106)
Content-Type: text/plain; charset=US-ASCII
Date: 01 May 1997 15:42:29 -0700
Message-ID: <m2k9liyfu2.fsf@altair.xemacs.org>
Lines: 38
X-Mailer: Gnus v5.4.49/XEmacs 20.2(beta4)

Hrvoje Niksic <hniksic@srce.hr> writes:

> "Karl M. Hegbloom" <karlheg@inetarena.com> writes:
>> I like to keep {C-h} bound to 'backward-delete-char.  Take this or
>> leave it, as you will.  :-)

As Hrvoje points out, thou shalt not bind keys to C-c <letter>.  Those
keys are strictly reserved for the user as they are the only such
reserved bindings.

> Both are wrong.  The right solution (at least in XEmacs) is something
> like:

> (define-key help-map "f" 'blahblah)
> (define-key help-map "v" 'blahblah)

This would define it permanently on that map, right?  I think you
still need to do some magic to make the bindings only appear in cperl
buffers.

> This will work will `C-h f' as well as `f1 f' as well as anything
> else.  It will also respect your binding of `C-h' to whatever you
> like.  `help-map' is present in GNU Emacs, too.

> I have no idea what `cperl-define-key' does, but I think it should be
> modified to use this mechanism rather than binding "raw" C-h.

It can't.  (Ugh!)

(defmacro cperl-define-key (fsf-key definition &optional xemacs-key)
  `(define-key cperl-mode-map
     ,(if xemacs-key
          `(if cperl-xemacs-p ,xemacs-key ,fsf-key)
        fsf-key)
     ,definition))
-- 
steve@miranova.com baur
Unsolicited commercial e-mail will be billed at $250/message.

