;; (if (not (or (eq major-mode 'Info-mode)
;; (eq major-mode 'vi-mode)))
;; (vi-mode))))))
-;; 3) In your .emacs file you can define the command "vi-mode" to be "autoload"
+;; 3) In your init file you can define the command "vi-mode" to be "autoload"
;; or you can execute the "load" command to load "vi" directly.
;; 4) Read the comments for command "vi-mode" before you start using it.
(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
(define-key vi-com-map "\C-s" 'vi-isearch-forward) ; extension
(define-key vi-com-map "\C-t" 'vi-transpose-objects) ; extension
(define-key vi-com-map "\C-u" 'vi-scroll-up-window)
- (define-key vi-com-map "\C-v" 'scroll-up) ; extension
+ (define-key vi-com-map "\C-v" 'scroll-up-command) ; extension
(define-key vi-com-map "\C-w" 'vi-kill-region) ; extension
(define-key vi-com-map "\C-x" 'Control-X-prefix) ; extension
(define-key vi-com-map "\C-y" 'vi-expose-line-above)
;; (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 ()
(if (null (vi-raw-numeric-prefix arg))
(with-no-warnings
(end-of-buffer))
- (goto-line (vi-prefix-numeric-value arg))))
+ (with-no-warnings (goto-line (vi-prefix-numeric-value arg)))))
(defun vi-beginning-of-buffer ()
"Move point to the beginning of current buffer."
(cond ((null shell-command)
(setq shell-command (read-string "!" nil))
(setq vi-last-shell-command shell-command)))
- (shell-command-on-region begin end shell-command (not (vi-prefix-char-value arg)))
+ (shell-command-on-region begin end shell-command (not (vi-prefix-char-value arg))
+ (not (vi-prefix-char-value arg)))
t)))
(defun vi-shift-op (motion-command arg amount)
(provide 'vi)
-;; arch-tag: ac9bdac3-8acb-4ddd-bdae-c6dd873153b3
;;; vi.el ends here