unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Michael Kifer <kifer@cs.stonybrook.edu>
To: Chong Yidong <cyd@gnu.org>
Cc: Stefano Zacchiroli <zack@upsilon.cc>, 9146@debbugs.gnu.org
Subject: bug#9146: M-x broken in console mode with viper (always gives: "viper bell"))
Date: Mon, 27 Feb 2012 20:32:03 -0500	[thread overview]
Message-ID: <20120227203203.4effd056@kiferserv> (raw)
In-Reply-To: <87ehtg7ffo.fsf@gnu.org>

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 <cyd@gnu.org> wrote:

> 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
> 





      parent reply	other threads:[~2012-02-28  1:32 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
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 [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=20120227203203.4effd056@kiferserv \
    --to=kifer@cs.stonybrook.edu \
    --cc=9146@debbugs.gnu.org \
    --cc=cyd@gnu.org \
    --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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).