From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: "Stefan Monnier" Newsgroups: gmane.emacs.devel Subject: Re: ehelp woes, or why I hate a module that I love so much Date: Thu, 27 Jun 2002 15:57:16 -0400 Sender: emacs-devel-admin@gnu.org Message-ID: <200206271957.g5RJvGB22457@rum.cs.yale.edu> References: <20020625155158.5935.LEKTU@terra.es> <20020627190100.35DA.LEKTU@terra.es> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1025208028 24658 127.0.0.1 (27 Jun 2002 20:00:28 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 27 Jun 2002 20:00:28 +0000 (UTC) Cc: rms@gnu.org, emacs-devel@gnu.org Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 17NfRM-0006Pb-00 for ; Thu, 27 Jun 2002 22:00:28 +0200 Original-Received: from fencepost.gnu.org ([199.232.76.164]) by quimby.gnus.org with esmtp (Exim 3.12 #1 (Debian)) id 17NfU6-0000J5-00 for ; Thu, 27 Jun 2002 22:03:18 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17NfRC-0002cL-00; Thu, 27 Jun 2002 16:00:18 -0400 Original-Received: from rum.cs.yale.edu ([128.36.229.169]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 17NfOJ-0002Qd-00; Thu, 27 Jun 2002 15:57:19 -0400 Original-Received: (from monnier@localhost) by rum.cs.yale.edu (8.11.6/8.11.6) id g5RJvGB22457; Thu, 27 Jun 2002 15:57:16 -0400 X-Mailer: exmh version 2.4 06/23/2000 with nmh-1.0.4 Original-To: Juanma Barranquero Errors-To: emacs-devel-admin@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.devel:5240 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:5240 > First I'd like to get some input from people around here regarding why > it is necessary for ehelp to use its own command-loop. I sure would like > to get rid of it. I don't think there's a very strong reason why the code uses its own command-loop. In other settings an explicit while loop calling `read-event' is used (in query-replace, for example), or some special keymap is installed on the overriding-terminal-local-map (in isearch). I'm sure that overriding-minor-mode-map-alist could be used as well. I don't like `read-event' because it fails to obey function-key-map and key-translation-map and because it doesn't run post/pre-command-hook and other such things. Note that all those different approaches behave subtly differently, so the trade-offs are not always obvious. It might be worth trying out something like overriding-terminal-local-map and see how it works. But you might end up finding out that the same problems show up (after all, a recursive command loop is really not very different from a (while ... (read-key-sequence) ...) or from temporarily setting the overriding-terminal-local-map). Stefan