From xemacs-m  Thu May  1 18:06:27 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 SAA05154
	for <xemacs-beta@xemacs.org>; Thu, 1 May 1997 18:06:25 -0500 (CDT)
Received: (from hniksic@localhost)
          by jagor.srce.hr (8.8.5/8.8.4)
	  id BAA19560; Fri, 2 May 1997 01:06:24 +0200 (MET DST)
To: XEmacs Developers <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> <m2k9liyfu2.fsf@altair.xemacs.org>
X-Save-Project-Gutenberg: <URL:http://www.promo.net/pg/nl/pgny_nov96.html>
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: 02 May 1997 01:06:23 +0200
In-Reply-To: Steven L Baur's message of 01 May 1997 15:42:29 -0700
Message-ID: <kigzpueg5cg.fsf@jagor.srce.hr>
Lines: 37
X-Mailer: Gnus v5.4.45/XEmacs 19.15

Steven L Baur <steve@miranova.com> writes:

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

Yup.  I don't know how much work that would be.

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

This has an additional degree of ugliness, as it seems to
differentiate XEmacs keys from FSF keys (why?).

(defmacro cperl-define-key (key definition)
  `(define-key cperl-mode-map ,key ,definition))

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
Contrary to popular belief, Unix is user friendly.  
It just happens to be selective about who it makes friends with.

