]> code.delx.au - gnu-emacs/blobdiff - lisp/emulation/vi.el
Bind `C-v' to `scroll-up-command' and `M-v' to `scroll-down-command'.
[gnu-emacs] / lisp / emulation / vi.el
index 64f610f4a13504c8cce9ba5a0883ccf76db85926..a65dd44e39e79eb182c4f86fb7c518904e4d0942 100644 (file)
@@ -79,8 +79,7 @@
     (if (null mode-cmd)
        (with-output-to-temp-buffer "*Help*"
          (princ (substitute-command-keys "Possible major modes to switch to: \\{vi-tilde-map}"))
-         (save-excursion
-           (set-buffer standard-output)
+         (with-current-buffer standard-output
            (help-mode)))
       (setq prefix-arg arg)            ; prefix arg will be passed down
       (command-execute mode-cmd nil)   ; may need to save mode-line-format etc
@@ -499,8 +498,7 @@ set sw=n     M-x set-variable vi-shift-width n "
 ;;  (cond ((string-match "s"))))
   (with-output-to-temp-buffer "*Help*"
     (princ (documentation 'vi-ex-cmd))
-    (save-excursion
-      (set-buffer standard-output)
+    (with-current-buffer standard-output
       (help-mode))))
 
 (defun vi-undefined ()