all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Chong Yidong <cyd@gnu.org>
To: Stefano Zacchiroli <zack@upsilon.cc>
Cc: Michael Kifer <kifer@cs.stonybrook.edu>, 9146@debbugs.gnu.org
Subject: bug#9146: M-x broken in console mode with viper (always gives: "viper bell"))
Date: Mon, 27 Feb 2012 18:12:43 +0800	[thread overview]
Message-ID: <87ehtg7ffo.fsf@gnu.org> (raw)
In-Reply-To: <jwvy5vva56l.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 04 Nov 2011 18:43:44 -0400")

Stefan Monnier <monnier@iro.umontreal.ca> 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






  reply	other threads:[~2012-02-27 10:12 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-22 10:45 bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell") Stefano Zacchiroli
     [not found] ` <handler.9146.B.131133154717743.ack@debbugs.gnu.org>
2011-09-28  7:25   ` bug#9146: Acknowledgement (24.0.50; M-x broken in console mode with viper (always gives: "viper bell")) Stefano Zacchiroli
2011-09-28 16:44     ` bug#9146: 24.0.50; M-x broken in console mode with viper (always gives: "viper bell") Glenn Morris
2011-09-28 16:48       ` Glenn Morris
2011-09-30  8:50         ` Stefano Zacchiroli
2011-09-30  9:14           ` Julien Danjou
2011-11-04 22:43     ` bug#9146: M-x broken in console mode with viper (always gives: "viper bell")) Stefan Monnier
2012-02-27 10:12       ` Chong Yidong [this message]
2012-02-27 12:08         ` Stefano Zacchiroli
2012-02-27 13:14           ` Chong Yidong
2012-02-27 14:17             ` Stefano Zacchiroli
2012-02-28  1:32         ` Michael Kifer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87ehtg7ffo.fsf@gnu.org \
    --to=cyd@gnu.org \
    --cc=9146@debbugs.gnu.org \
    --cc=kifer@cs.stonybrook.edu \
    --cc=zack@upsilon.cc \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.