summaryrefslogtreecommitdiff
path: root/lisp/emulation/vi.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/emulation/vi.el')
-rw-r--r--lisp/emulation/vi.el6
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/emulation/vi.el b/lisp/emulation/vi.el
index 64f610f4a13..a65dd44e39e 100644
--- a/lisp/emulation/vi.el
+++ b/lisp/emulation/vi.el
@@ -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 ()