From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Karl Eichwalder Newsgroups: gmane.emacs.psgml.devel,gmane.emacs.devel Subject: Re: Key sequence C-c C-f C-e uses invalid prefix characters Date: Tue, 10 Dec 2002 08:05:26 +0100 Sender: psgml-devel-admin@lists.sourceforge.net Message-ID: References: <5x3czq4lzb.fsf@kfs2.cua.dk> <200202271030.MAA22372@is.elta.co.il> <5x8z9e5ymx.fsf@kfs2.cua.dk> <5xpu2q2aof.fsf@kfs2.cua.dk> <200203010011.g210BRc05072@rum.cs.yale.edu> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: main.gmane.org 1039504336 9445 80.91.224.249 (10 Dec 2002 07:12:16 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Tue, 10 Dec 2002 07:12:16 +0000 (UTC) Cc: no-spam@cua.dk (Kim F. Storm), Pavel@Janik.cz, emacs-devel@gnu.org, psgml-devel@lists.sourceforge.net, mvidner@suse.cz Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18LeYX-0002RD-00 for ; Tue, 10 Dec 2002 08:11:49 +0100 Original-Received: from lists.sourceforge.net ([66.35.250.206] helo=sc8-sf-list2.sourceforge.net) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 18Leiz-0005RH-00 for ; Tue, 10 Dec 2002 08:22:37 +0100 Original-Received: from sc8-sf-list1-b.sourceforge.net ([10.3.1.13] helo=sc8-sf-list1.sourceforge.net) by sc8-sf-list2.sourceforge.net with esmtp (Exim 3.31-VA-mm2 #1 (Debian)) id 18LeUu-00053T-00; Mon, 09 Dec 2002 23:08:04 -0800 Original-Received: from elvis.franken.de ([193.175.24.41] ident=[HU/UtUm53ka/pYmh0GYXrIFVuhSR7JUJ]) by sc8-sf-list1.sourceforge.net with esmtp (Cipher TLSv1:DES-CBC3-SHA:168) (Exim 3.31-VA-mm2 #1 (Debian)) id 18LeUa-00081Z-00 for ; Mon, 09 Dec 2002 23:07:44 -0800 Original-Received: from uucp by elvis.franken.de with local-rmail (Exim 3.36 #1) id 18LeUN-00042x-00; Tue, 10 Dec 2002 08:07:31 +0100 Original-Received: by tux.gnu.franken.de (Postfix, from userid 270) id AB7D9A43E4; Tue, 10 Dec 2002 08:05:26 +0100 (CET) Original-To: "Stefan Monnier" In-Reply-To: <200203010011.g210BRc05072@rum.cs.yale.edu> ("Stefan Monnier"'s message of "Thu, 28 Feb 2002 19:11:27 -0500") Original-Lines: 48 User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.3.50 (i686-pc-linux-gnu) Errors-To: psgml-devel-admin@lists.sourceforge.net X-BeenThere: psgml-devel@lists.sourceforge.net X-Mailman-Version: 2.0.9-sf.net Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: List-Unsubscribe: , List-Archive: X-Original-Date: Tue, 10 Dec 2002 08:05:26 +0100 Xref: main.gmane.org gmane.emacs.psgml.devel:54 gmane.emacs.devel:10026 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:10026 "Stefan Monnier" writes: >> In any case, this would be easy to fix in psgml.el (is anyone listening = ?): >> just be sure to unbind (define-key ... nil) all of the C-c C-? prefixes = in >> sgml-mode-map before (re)using them as prefix keys later on. Better do = this >> on too many keys than too few. > > First, I simply think that define-key should not fail in the above > way at all (i.e. rebinding an existing prefix key to a command, > thus turning a prefix key into a non-prefix key, should work just fine > because it is a perfectly acceptable operation). AFAIK (21.2), define-key still isn't able to rebind an existing prefix key; at least I failed to load psgml when sgml-mode coming with Emacs was loaded first (the problem was brought to my attention by Martin Vidner, thanks!). I don't know whether that's a bug or a feature; problably a feature since the Elisp manual says: Every prefix of KEY must be a prefix key (i.e., bound to a keymap) or undefined; otherwise an error is signaled. If some prefix of KEY is undefined, then `define-key' defines it as a prefix key so that the rest of KEY can be defined as specified. My emacs lisp skills are limited, but I'd like to sort out this problem; Stefan made these proposals to fix the problem in a sane manner: > Other ways to fix the problem: > - Use `psgml-' as prefix rather than `sgml-' so that the two packages can > coexist peacefully. > - Explicitly (unload-feature 'sgml-mode) at the beginning of psgml's code. The second proposal looks rather heavy, but easy to implement. I guess some users won't like it, since they might want to make use of the HTML support provided by sgml-mode. The first way would mean you will have to change all the files all over and in the end user customizations will be broken and all users will get used to new commands: M-x psgml-... instead of M-x sgml-...=A0 What do you think? Especially what's your position on this issue, Lennart? By all means we must avoid a fork! --=20 ke@suse.de (work) / keichwa@gmx.net (home): | http://www.gnu.franken.de/ke/ | ,__o Free Translation Project: | _-\_<, http://www.iro.umontreal.ca/contrib/po/HTML/ | (*)/'(*) ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sf