0

I have been enjoying Xah Fly Keys by @XahLee and I am trying to create my own keymap for some org-mode functions. I have read the helpful documentation. I used this section as a template for my keymap:
Add or Change Leader Key Sequence - Here's a example of creating a whole keymap

When I start emacs I get this error massage.

Warning (initialization): An error occurred while loading `/root/.emacs':
Symbol's value as variable is void: xah-fly-leader-keymap

This is the part of my .emacs where I am trying to create the keymap.

(setq my-org-mode-keymap (make-sparse-keymap))
(define-key my-org-mode-keymap (kbd "o") 'org-meta-return)
(define-key my-org-mode-keymap (kbd "c") 'org-metaup)
(define-key my-org-mode-keymap (kbd "t") 'org-metadown)
(define-key my-org-mode-keymap (kbd "h") 'org-demote-subtree)
(define-key my-org-mode-keymap (kbd "n") 'org-promote-subtree)
(define-key my-org-mode-keymap (kbd "g") 'org-shiftright)

(define-key xah-fly-leader-key-map (kbd "o") my-org-mode-keymap)
learningemacs
  • 353
  • 1
  • 3
  • 11

1 Answers1

0

@Drew thank you for linking to the other answer.
@wasamasa thanks for your help on IRC Freenode emacs-beginners.

The error was because I had accidentally removed the - from xah-fly-leader-key-map so it was xah-fly-leader-keymap in a customization that had previously been working on and had been working fine.

The error was:

(define-key xah-fly-leader-keymap (kbd "-") 'exchange-point-and-mark)

The fix was:

(define-key xah-fly-leader-key-map (kbd "-") 'exchange-point-and-mark)
learningemacs
  • 353
  • 1
  • 3
  • 11