Function: vi-mode-setup
vi-mode-setup is a byte-compiled function defined in vi.el.gz.
Signature
(vi-mode-setup)
Documentation
Setup a buffer for vi-mode by creating necessary buffer-local variables.
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/vi.el.gz
;(defconst vi-add-to-mode-line-1
; '(overwrite-mode nil " Insert"))
;; Value is same as vi-add-to-mode-line-1 when in vi mode,
;; but nil in other buffers.
;(defvar vi-add-to-mode-line nil)
(defun vi-mode-setup ()
"Setup a buffer for vi-mode by creating necessary buffer-local variables."
; (make-local-variable 'vi-add-to-mode-line)
; (setq vi-add-to-mode-line vi-add-to-mode-line-1)
; (or (memq vi-add-to-mode-line minor-mode-alist)
; (setq minor-mode-alist (cons vi-add-to-mode-line minor-mode-alist)))
(make-local-variable 'vi-scroll-amount)
(setq vi-scroll-amount (/ (window-height) 2))
(make-local-variable 'vi-shift-width)
(setq vi-shift-width 4)
(make-local-variable 'vi-ins-point)
(make-local-variable 'vi-ins-length)
(make-local-variable 'vi-ins-repetition)
(make-local-variable 'vi-ins-overwrt-p)
(make-local-variable 'vi-ins-prefix-code)
(make-local-variable 'vi-last-change-command)
(make-local-variable 'vi-last-shell-command)
(make-local-variable 'vi-last-find-char)
(make-local-variable 'vi-mark-alist)
(make-local-variable 'vi-insert-state)
(make-local-variable 'vi-mode-old-local-map)
(make-local-variable 'vi-mode-old-mode-name)
(make-local-variable 'vi-mode-old-major-mode)
(make-local-variable 'vi-mode-old-case-fold)
(run-mode-hooks 'vi-mode-hook))