summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRavi R Kiran <aine.marina@gmail.com>2015-05-26 04:13:19 (GMT)
committerRavi R Kiran <aine.marina@gmail.com>2015-05-26 04:13:19 (GMT)
commit11ba816c065aa64eb3b2de33e70fd7d2ca609335 (patch)
tree92cd865d21360048e7f8bc22f6157181ae29cccb
parent9d2ed4ac5ab9d43d6b6917ce4da36622f98058b0 (diff)
downloaddotemacs-11ba816c065aa64eb3b2de33e70fd7d2ca609335.zip
dotemacs-11ba816c065aa64eb3b2de33e70fd7d2ca609335.tar.gz
dotemacs-11ba816c065aa64eb3b2de33e70fd7d2ca609335.tar.bz2
Simplify launcher map using bind-keys
-rw-r--r--lisp/ravi-init-function.el36
1 files changed, 19 insertions, 17 deletions
diff --git a/lisp/ravi-init-function.el b/lisp/ravi-init-function.el
index da87931..d1c8230 100644
--- a/lisp/ravi-init-function.el
+++ b/lisp/ravi-init-function.el
@@ -51,25 +51,27 @@ and file 'filename' will be opened and cursor set on line 'linenumber'"
;; Combined launcher and toggle-maps
(defun ravi/setup-toggle-launcher-map ()
- (define-prefix-command 'ravi/toggle-launcher-map)
- (bind-key "t" 'ravi/toggle-launcher-map ctl-x-map)
+ (bind-keys :map ctl-x-map
+ :prefix-map ravi/setup-toggle-launcher-map
+ :prefix-docstring "Launcher/toggle map"
+ :prefix "t"
- ;; Toggles
- (bind-key "c" 'column-number-mode ravi/toggle-launcher-map)
- (bind-key "e" 'toggle-debug-on-error ravi/toggle-launcher-map)
- (bind-key "f" 'auto-fill-mode ravi/toggle-launcher-map)
- (bind-key "l" 'toggle-truncate-lines ravi/toggle-launcher-map)
- (bind-key "q" 'toggle-debug-on-quit ravi/toggle-launcher-map)
- ;; Generalized version of `read-only-mode'.
- (bind-key "r" 'dired-toggle-read-only ravi/toggle-launcher-map)
- (autoload 'dired-toggle-read-only "dired" nil t)
- (bind-key "w" 'whitespace-mode ravi/toggle-launcher-map)
+ ;; Toggles
+ ("c" . column-number-mode)
+ ("e" . toggle-debug-on-error)
+ ("f" . auto-fill-mode)
+ ("l" . toggle-truncate-lines)
+ ("q" . toggle-debug-on-quit)
+ ;; Generalized version of `read-only-mode'.
+ ("r" . dired-toggle-read-only)
+ ("w" . whitespace-mode)
- ;; Launchers
- (bind-key "P" 'package-list-packages ravi/toggle-launcher-map)
- (bind-key "p" 'proced ravi/toggle-launcher-map)
- (bind-key "d" 'ediff-buffers ravi/toggle-launcher-map)
- (bind-key "F" 'find-dired ravi/toggle-launcher-map)
+ ;; Launchers
+ ("P" . package-list-packages)
+ ("p" . proced)
+ ("d" . ediff-buffers)
+ ("F" . find-dired))
+ (autoload 'dired-toggle-read-only "dired" nil t)
(add-to-list 'guide-key/guide-key-sequence "C-x t"))
(ravi/setup-toggle-launcher-map)