From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.bugs Subject: bug#11983: 24.1; Electric-command-loop broken? Date: Thu, 19 Jul 2012 04:40:43 -0400 Message-ID: References: <87pq7s6b8q.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1342689130 6034 80.91.229.3 (19 Jul 2012 09:12:10 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 19 Jul 2012 09:12:10 +0000 (UTC) Cc: 11983@debbugs.gnu.org To: "Roland Winkler" Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jul 19 11:12:10 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SrmmD-0001ZS-Pl for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jul 2012 11:12:05 +0200 Original-Received: from localhost ([::1]:46906 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrmmC-0001O5-Mc for geb-bug-gnu-emacs@m.gmane.org; Thu, 19 Jul 2012 05:12:04 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:53618) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Srmm0-0001Ah-OQ for bug-gnu-emacs@gnu.org; Thu, 19 Jul 2012 05:12:02 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Srmlz-0006GZ-Fj for bug-gnu-emacs@gnu.org; Thu, 19 Jul 2012 05:11:52 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:39981) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Srmlz-0006GV-CV for bug-gnu-emacs@gnu.org; Thu, 19 Jul 2012 05:11:51 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1Srmrx-0004UX-LH for bug-gnu-emacs@gnu.org; Thu, 19 Jul 2012 05:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stefan Monnier Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 19 Jul 2012 09:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 11983 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 11983-submit@debbugs.gnu.org id=B11983.134268946917245 (code B ref 11983); Thu, 19 Jul 2012 09:18:01 +0000 Original-Received: (at 11983) by debbugs.gnu.org; 19 Jul 2012 09:17:49 +0000 Original-Received: from localhost ([127.0.0.1]:49527 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Srmrl-0004U6-Et for submit@debbugs.gnu.org; Thu, 19 Jul 2012 05:17:49 -0400 Original-Received: from pruche.dit.umontreal.ca ([132.204.246.22]:35396) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1Srmrj-0004Tz-A1 for 11983@debbugs.gnu.org; Thu, 19 Jul 2012 05:17:47 -0400 Original-Received: from fmsmemgm.homelinux.net (lechon.iro.umontreal.ca [132.204.27.242]) by pruche.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id q6J9BZHd005139; Thu, 19 Jul 2012 05:11:35 -0400 Original-Received: by fmsmemgm.homelinux.net (Postfix, from userid 20848) id F3778AE20D; Thu, 19 Jul 2012 04:40:43 -0400 (EDT) In-Reply-To: <87pq7s6b8q.fsf@gnu.org> (Roland Winkler's message of "Wed, 18 Jul 2012 15:54:45 -0500") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1.50 (gnu/linux) X-NAI-Spam-Flag: NO X-NAI-Spam-Threshold: 5 X-NAI-Spam-Score: 0 X-NAI-Spam-Rules: 1 Rules triggered RV4283=0 X-NAI-Spam-Version: 2.2.0.9309 : core <4283> : streams <787121> : uri <1169177> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:62150 Archived-At: > I am trying to understand Electric-command-loop in electric.el I do not understand what it's trying to do, let alone how it's trying to do it. The best I could understand of what it's trying to do is summarized in the commentary I added: ;; - electric modes and buffers: modes that typically pop-up in a modal kind of ;; way a transient buffer that automatically disappears as soon as the user ;; is done with it. > (this is used by BBDB 3): Could you maybe then describe the expected behavior, from the user's point of view? Adding docstrings, and/or improving comments would be very welcome. > - The code contains a hard-coded > (setq universal-argument-num-events 0) > Apparently this is never reset, so exiting Electric-command-loop > leaves behind this binding. It's a global var used by `universal-argument'. `universal-argument' is implemented in a rather intricate way, part of which is actually hidden deep in the C code. universal-argument-num-events is used for when you finish a C-u sequence to find which keys are part of the universal argument and which keys are part of the actual command you wan to run. `universal-argument' should really use something like set-temporary-overlay-map instead so it wouldn't need universal-argument-other-key and neither would it have to fiddle with unread-command-events. > - The doc string says > ;; Given third argument non-nil, it > ;; INHIBITS quitting unless the user types C-g at toplevel. This is > ;; so user can do things like C-u C-g and not get thrown out. > Yet it appears to me, that even for C-u C-g the user gets thrown out. I have no idea what this "C-u C-g" refers to, indeed. Stefan