Permalink
Switch branches/tags
Nothing to show
Find file
f7d8dd7 Nov 20, 2017
32 lines (29 sloc) 1.02 KB
(require 'one-key)
(defmacro setup-one-key (key title)
(with-temp-buffer
(insert "(progn")
(one-key-insert-template key title)
(insert (format "(global-set-key (kbd \"%s\") 'one-key-menu-%s)"
(regexp-quote key) title))
(insert ")")
(goto-char (point-min))
(read (current-buffer))))
(setup-one-key "M-s" "search")
(setup-one-key "M-g" "goto")
(setup-one-key "C-h e" "emacs-help")
(setup-one-key "C-x a" "abbrevs")
(setup-one-key "C-x j" "bmkp")
(setup-one-key "C-x r" "bookmarks-and-rectangles")
(setup-one-key "C-x X" "edebug")
(setup-one-key "C-x 4" "other-window")
(setup-one-key "C-x 5" "other-frame")
(setup-one-key "C-x 6" "two-columns")
(setup-one-key "C-x C-k" "kmacro")
(setup-one-key "C-x C-p" "pages")
(setup-one-key "C-c e" "emacs-lisp")
(setup-one-key "C-c i" "flyspell")
(setup-one-key "C-c t" "tags")
(setup-one-key "C-c x" "org-mode")
(setup-one-key "C-c w" "yaoddmuse")
(setup-one-key "C-c y" "yasnippet")
(setup-one-key "C-\\" "workgroups")