From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Michael Kifer Newsgroups: gmane.emacs.bugs Subject: bug#9146: M-x broken in console mode with viper (always gives: "viper bell")) Date: Mon, 27 Feb 2012 20:32:03 -0500 Organization: Stony Brook University Message-ID: <20120227203203.4effd056@kiferserv> References: <877h7ar3ug.fsf@usha.takhisis.invalid> <20110928072531.GA12901@upsilon.cc> <87ehtg7ffo.fsf@gnu.org> Reply-To: kifer@cs.stonybrook.edu NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1330400863 16070 80.91.229.3 (28 Feb 2012 03:47:43 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 28 Feb 2012 03:47:43 +0000 (UTC) Cc: Stefano Zacchiroli , 9146@debbugs.gnu.org To: Chong Yidong Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Feb 28 04:47:41 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 1S2E2O-0001QG-9s for geb-bug-gnu-emacs@m.gmane.org; Tue, 28 Feb 2012 04:47:40 +0100 Original-Received: from localhost ([::1]:60862 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2E2N-0006VO-OU for geb-bug-gnu-emacs@m.gmane.org; Mon, 27 Feb 2012 22:47:39 -0500 Original-Received: from eggs.gnu.org ([208.118.235.92]:39073) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2E1B-00060k-8a for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 22:46:26 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S2E19-0005Jr-E5 for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 22:46:24 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58640) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S2E19-0005Jj-AA for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 22:46:23 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1S2E3i-0002Jo-9K for bug-gnu-emacs@gnu.org; Mon, 27 Feb 2012 22:49:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Michael Kifer Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 28 Feb 2012 03:49:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 9146 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 9146-submit@debbugs.gnu.org id=B9146.13304009058868 (code B ref 9146); Tue, 28 Feb 2012 03:49:02 +0000 Original-Received: (at 9146) by debbugs.gnu.org; 28 Feb 2012 03:48:25 +0000 Original-Received: from localhost ([127.0.0.1]:60537 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2E36-0002Io-V2 for submit@debbugs.gnu.org; Mon, 27 Feb 2012 22:48:25 -0500 Original-Received: from edge1.cs.stonybrook.edu ([130.245.9.210]:26797) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1S2ByG-0007Hz-Bh for 9146@debbugs.gnu.org; Mon, 27 Feb 2012 20:35:17 -0500 Original-Received: from HUBCAS1.cs.stonybrook.edu (130.245.9.206) by edge1.cs.stonybrook.edu (130.245.9.210) with Microsoft SMTP Server (TLS) id 14.1.355.2; Mon, 27 Feb 2012 20:32:05 -0500 Original-Received: from kiferserv (71.190.48.214) by hubcas1.cs.stonybrook.edu (130.245.9.212) with Microsoft SMTP Server (TLS) id 14.1.323.3; Mon, 27 Feb 2012 20:32:06 -0500 In-Reply-To: <87ehtg7ffo.fsf@gnu.org> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.24.4; x86_64-pc-linux-gnu) X-Originating-IP: [71.190.48.214] X-Mailman-Approved-At: Mon, 27 Feb 2012 22:48:13 -0500 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-Mailman-Approved-At: Mon, 27 Feb 2012 22:47:37 -0500 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:57340 Archived-At: Thanks Chong. I meant to get to this all these months, but my stack of things to do kept getting deeper and deeper... michael On Mon, 27 Feb 2012 18:12:43 +0800 Chong Yidong wrote: > Stefan Monnier writes: > > > IOW viper-intercept-ESC-key needs to be changed to call key-binding in > > a context where Viper's minor-mode map(s) have been temporarily disabled > > so the ESC binding to viper-intercept-ESC-key doesn't hide the thing > > we're looking for. > > Since no one else has stepped up to the plate, I took a crack at this. > > Stefano, could you test if the following patch does the right thing? > > > *** lisp/emulation/viper-cmd.el 2012-01-19 07:21:25 +0000 > --- lisp/emulation/viper-cmd.el 2012-02-27 10:10:42 +0000 > *************** > *** 1086,1093 **** > (defun viper-intercept-ESC-key () > "Function that implements ESC key in Viper emulation of Vi." > (interactive) > ! (let ((cmd (or (key-binding (viper-envelop-ESC-key)) > ! (lambda () (interactive) (error "Viper bell"))))) > > ;; call the actual function to execute ESC (if no other symbols > followed) ;; or the key bound to the ESC sequence (if the sequence was issued > --- 1086,1098 ---- > (defun viper-intercept-ESC-key () > "Function that implements ESC key in Viper emulation of Vi." > (interactive) > ! (let* ((event (viper-envelop-ESC-key)) > ! (cmd (cond ((equal event viper-ESC-key) > ! 'viper-intercept-ESC-key) > ! ((let ((emulation-mode-map-alists nil)) > ! (key-binding event))) > ! (t > ! (error "Viper bell"))))) > > ;; call the actual function to execute ESC (if no other symbols > followed) ;; or the key bound to the ESC sequence (if the sequence was issued >