Function: vcursor-bind-keys

vcursor-bind-keys is a byte-compiled function defined in vcursor.el.gz.

Signature

(vcursor-bind-keys VAR VALUE)

Documentation

Alter the value of the variable VAR to VALUE, binding keys as required.

VAR is usually vcursor-key-bindings. Normally this function is called on loading vcursor and from the customize package.

Source Code

;; Defined in /usr/src/emacs/lisp/vcursor.el.gz
(defun vcursor-bind-keys (var value)
  "Alter the value of the variable VAR to VALUE, binding keys as required.
VAR is usually `vcursor-key-bindings'.  Normally this function is called
on loading vcursor and from the customize package."
  (set var value)
  (cond
   ((not value)) ;; Don't set any key bindings.
   ((eq value 'oemacs)
    (global-set-key [C-f1] #'vcursor-toggle-copy)
    (global-set-key [C-f2] #'vcursor-copy)
    (global-set-key [C-f3] #'vcursor-copy-word)
    (global-set-key [C-f4] #'vcursor-copy-line)

    (global-set-key [S-f1] #'vcursor-disable)
    (global-set-key [S-f2] #'vcursor-other-window)
    (global-set-key [S-f3] #'vcursor-goto)
    (global-set-key [S-f4] #'vcursor-swap-point)

    (global-set-key [C-f5] #'vcursor-backward-char)
    (global-set-key [C-f6] #'vcursor-previous-line)
    (global-set-key [C-f7] #'vcursor-next-line)
    (global-set-key [C-f8] #'vcursor-forward-char)

    (global-set-key [M-f5] #'vcursor-beginning-of-line)
    (global-set-key [M-f6] #'vcursor-backward-word)
    (global-set-key [M-f6] #'vcursor-forward-word)
    (global-set-key [M-f8] #'vcursor-end-of-line)

    (global-set-key [S-f5] #'vcursor-beginning-of-buffer)
    (global-set-key [S-f6] #'vcursor-scroll-down)
    (global-set-key [S-f7] #'vcursor-scroll-up)
    (global-set-key [S-f8] #'vcursor-end-of-buffer)

    (global-set-key [C-f9] #'vcursor-isearch-forward)

    (global-set-key [S-f9] #'vcursor-execute-key)
    (global-set-key [S-f10] #'vcursor-execute-command)
    )
   (t
    (global-set-key (vcursor-cs-binding "up") #'vcursor-previous-line)
    (global-set-key (vcursor-cs-binding "down") #'vcursor-next-line)
    (global-set-key (vcursor-cs-binding "left") #'vcursor-backward-char)
    (global-set-key (vcursor-cs-binding "right") #'vcursor-forward-char)

    (global-set-key (vcursor-cs-binding "return") #'vcursor-disable)
    (global-set-key (vcursor-cs-binding "insert")  #'vcursor-copy)
    (global-set-key (vcursor-cs-binding "delete") #'vcursor-copy-word)
    (global-set-key (vcursor-cs-binding "remove") #'vcursor-copy-word)
    (global-set-key (vcursor-cs-binding "tab") #'vcursor-toggle-copy)
    (global-set-key (vcursor-cs-binding "backtab") #'vcursor-toggle-copy)
    (global-set-key (vcursor-cs-binding "home") #'vcursor-beginning-of-buffer)
    (global-set-key (vcursor-cs-binding "up" t) #'vcursor-beginning-of-buffer)
    (global-set-key (vcursor-cs-binding "end") #'vcursor-end-of-buffer)
    (global-set-key (vcursor-cs-binding "down" t) #'vcursor-end-of-buffer)
    (global-set-key (vcursor-cs-binding "prior") #'vcursor-scroll-down)
    (global-set-key (vcursor-cs-binding "next") #'vcursor-scroll-up)

    (global-set-key (vcursor-cs-binding "f6") #'vcursor-other-window)
    (global-set-key (vcursor-cs-binding "f7") #'vcursor-goto)

    (global-set-key (vcursor-cs-binding "select")
		    #'vcursor-swap-point) ; DEC keyboards
    (global-set-key (vcursor-cs-binding "tab" t) #'vcursor-swap-point)

    (global-set-key (vcursor-cs-binding "find")
		    #'vcursor-isearch-forward) ; DEC keyboards
    (global-set-key (vcursor-cs-binding "f8") #'vcursor-isearch-forward)

    (global-set-key (vcursor-cs-binding "left" t) #'vcursor-beginning-of-line)
    (global-set-key (vcursor-cs-binding "right" t) #'vcursor-end-of-line)

    (global-set-key (vcursor-cs-binding "prior" t) #'vcursor-backward-word)
    (global-set-key (vcursor-cs-binding "next" t) #'vcursor-forward-word)

    (global-set-key (vcursor-cs-binding "return" t) #'vcursor-copy-line)

    (global-set-key (vcursor-cs-binding "f9") #'vcursor-execute-key)
    (global-set-key (vcursor-cs-binding "f10") #'vcursor-execute-command)
    )))