keymaps.scm 608 B

123456789101112131415161718192021222324252627
  1. (define-module (lang elisp primitives keymaps)
  2. #:use-module (lang elisp internals fset))
  3. (define (make-sparse-keymap)
  4. (list 'keymap))
  5. (define (define-key keymap key def)
  6. (set-cdr! keymap
  7. (cons (cons key def) (cdr keymap))))
  8. (define global-map (make-sparse-keymap))
  9. (define esc-map (make-sparse-keymap))
  10. (define ctl-x-map (make-sparse-keymap))
  11. (define ctl-x-4-map (make-sparse-keymap))
  12. (define ctl-x-5-map (make-sparse-keymap))
  13. ;;; {Elisp Exports}
  14. (fset 'make-sparse-keymap make-sparse-keymap)
  15. (fset 'define-key define-key)
  16. (export global-map
  17. esc-map
  18. ctl-x-map
  19. ctl-x-4-map
  20. ctl-x-5-map)