Skip to content

Commit

Permalink
Add information on defining keys
Browse files Browse the repository at this point in the history
  • Loading branch information
GuiltyDolphin committed Aug 28, 2016
1 parent 94e30dd commit 1fee0e1
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,28 @@
* Introduction

Emaps provides utilities for working with keymaps and keybindings in Emacs.

* Features

** Defining keys

Emacs has a built-in ~define-key~ function, but this can only handle one binding
at a time, for example:

#+BEGIN_SRC emacs-lisp
(define-key keymap "a" 'fun-a)
(define-key keymap "b" 'fun-b)
(define-key keymap "c" 'fun-c)
; etc.
#+END_SRC

Emaps provides the ~emaps-define-key~ function that provides the same
functionality, but allows multiple keys to be defined at once, thus the
above becomes:

#+BEGIN_SRC emacs-lisp
(emaps-define-key keymap
"a" 'fun-a
"b" 'fun-b
"c" 'fun-c) ; etc.
#+END_SRC

0 comments on commit 1fee0e1

Please sign in to comment.