]> git.eshelyaron.com Git - emacs.git/commitdiff
* viper-cmd.el (viper-escape-to-state): bug fix
authorMichael Kifer <kifer@cs.stonybrook.edu>
Tue, 19 Jul 2005 05:01:20 +0000 (05:01 +0000)
committerMichael Kifer <kifer@cs.stonybrook.edu>
Tue, 19 Jul 2005 05:01:20 +0000 (05:01 +0000)
(viper-envelop-ESC-key): changed the definition of fast keysequence so
it'll work with keyboard macros

* ediff.el (ediff-patch-buffer): changed the docstring.

lisp/ChangeLog
lisp/ediff.el
lisp/emulation/viper-cmd.el

index 4e17939aab1cd2b945cf83c4eaf5d617aa94a0ea..94892c13f58969e811033397dcab6d89ce36d1cd 100644 (file)
@@ -1,3 +1,11 @@
+2005-07-19  Michael Kifer  <kifer@cs.stonybrook.edu>
+       
+       * viper-cmd.el (viper-escape-to-state): bug fix
+       (viper-envelop-ESC-key): changed the definition of fast keysequence so
+       it'll work with keyboard macros
+       
+       * ediff.el (ediff-patch-buffer): changed the docstring.
+       
 2005-07-19  Kenichi Handa  <handa@m17n.org>
 
        * international/mule-cmds.el (select-safe-coding-system): Try to
index f842e9dec6c3c8494cd0c55f9756013b98217cad..1bf52b1c59f741550b14897908b63973abe56d9a 100644 (file)
@@ -1357,11 +1357,13 @@ buffer. If odd -- assume it is in a file."
 
 ;;;###autoload
 (defun ediff-patch-buffer (&optional arg patch-buf)
-  "Run Ediff by patching BUFFER-NAME.
-Without prefix argument: asks if the patch is in some buffer and prompts for
-the buffer or a file, depending on the answer.
-With prefix arg=1: assumes the patch is in a file and prompts for the file.
-With prefix arg=2: assumes the patch is in a buffer and prompts for the buffer."
+  "Run Ediff by patching the buffer specified at prompt.
+Without the optional prefix ARG, asks if the patch is in some buffer and
+prompts for the buffer or a file, depending on the answer.
+With ARG=1, assumes the patch is in a file and prompts for the file.
+With ARG=2, assumes the patch is in a buffer and prompts for the buffer.
+PATCH-BUF is an optional argument, which specifies the buffer that contains the
+patch. If not given, the user is prompted according to the prefix argument."
   (interactive "P")
   (require 'ediff-ptch)
   (setq patch-buf
index ecd5251891c576da66b6e6c659a436fa4f463829..47b677b2e195b8c0aa49dd479569becdda6c2c27 100644 (file)
@@ -774,7 +774,8 @@ Vi's prefix argument will be used.  Otherwise, the prefix argument passed to
           )
 
          (if (commandp com)
-             (progn
+             ;; pretend that current state is the state we excaped to
+             (let ((viper-current-state state))
                (setq prefix-arg (or prefix-arg arg))
                (command-execute com)))
          )
@@ -996,9 +997,12 @@ as a Meta key and any number of multiple escapes is allowed."
        (inhibit-quit t))
     (if (viper-ESC-event-p event)
        (progn
-         (if (viper-fast-keysequence-p)
+         ;; Emacs 22.50.8 introduced a bug, which makes even a single ESC into
+         ;; a fast keyseq. To guard against this, we added a check if there
+         ;; are other events as well
+         (if (and (viper-fast-keysequence-p) unread-command-events)
              (progn
-               (let (minor-mode-map-alist)
+               (let (minor-mode-map-alist emulation-mode-map-alists)
                  (viper-set-unread-command-events event)
                  (setq keyseq (read-key-sequence nil 'continue-echo))
                  ) ; let