Function: allout-compose-and-institute-keymap

allout-compose-and-institute-keymap is a byte-compiled function defined in allout.el.gz.

Signature

(allout-compose-and-institute-keymap &optional VARNAME VALUE)

Documentation

Create the allout keymap according to the keybinding specs, and set it.

Useful standalone or to effect customizations of the respective allout-mode(var)/allout-mode(fun) keybinding variables, allout-command-prefix, allout-prefixed-keybindings, and allout-unprefixed-keybindings

Source Code

;; Defined in /usr/src/emacs/lisp/allout.el.gz
;;;_   > allout-compose-and-institute-keymap (&optional varname value)
(defun allout-compose-and-institute-keymap (&optional varname value)
  "Create the allout keymap according to the keybinding specs, and set it.

Useful standalone or to effect customizations of the
respective `allout-mode' keybinding variables, `allout-command-prefix',
`allout-prefixed-keybindings', and `allout-unprefixed-keybindings'"
  ;; Set the customization variable, if any:
  (when varname
    (set-default varname value))
  (let ((map (make-sparse-keymap)))
    (when (boundp 'allout-prefixed-keybindings)
      ;; tolerate first definitions of the variables:
      (dolist (entry allout-prefixed-keybindings)
        (define-key map
          ;; XXX vector vs non-vector key descriptions?
          (vconcat allout-command-prefix
                   (car (read-from-string (car entry))))
          (cadr entry))))
    (when (boundp 'allout-unprefixed-keybindings)
      (dolist (entry allout-unprefixed-keybindings)
        (define-key map (car (read-from-string (car entry))) (cadr entry))))
    (define-key map [remap beginning-of-line]      #'allout-beginning-of-line)
    (define-key map [remap move-beginning-of-line] #'allout-beginning-of-line)
    (define-key map [remap end-of-line]            #'allout-end-of-line)
    (define-key map [remap move-end-of-line]       #'allout-end-of-line)
    (allout-institute-keymap map)))