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))))
(substitute-key-definition #'beginning-of-line #'allout-beginning-of-line
map global-map)
(substitute-key-definition #'move-beginning-of-line
#'allout-beginning-of-line
map global-map)
(substitute-key-definition #'end-of-line #'allout-end-of-line
map global-map)
(substitute-key-definition #'move-end-of-line #'allout-end-of-line
map global-map)
(allout-institute-keymap map)))