From a63f62b8c017939e94990dfd22cbac26814820e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20J=2E=20P=C3=A9rez=20Irizarry?= Date: Wed, 25 Sep 2013 17:04:07 -0400 Subject: [PATCH] Unbind conflicting prelude-mode keys. --- modules/prelude-org.el | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/modules/prelude-org.el b/modules/prelude-org.el index d35a2fe..95a09aa 100644 --- a/modules/prelude-org.el +++ b/modules/prelude-org.el @@ -38,12 +38,19 @@ (global-set-key "\C-cb" 'org-iswitchb) (setq org-log-done t) -;; (defun prelude-org-mode-defaults () -;; ) +(defun prelude-org-mode-defaults () + (let ((oldmap (cdr (assoc 'prelude-mode minor-mode-map-alist))) + (newmap (make-sparse-keymap))) + (set-keymap-parent newmap oldmap) + (define-key newmap (kbd "C-c +") nil) + (define-key newmap (kbd "C-c -") nil) + (make-local-variable 'minor-mode-overriding-map-alist) + (push `(prelude-mode . ,newmap) minor-mode-overriding-map-alist)) +) -;; (setq prelude-org-mode-hook 'prelude-org-mode-defaults) +(setq prelude-org-mode-hook 'prelude-org-mode-defaults) -;; (add-hook 'org-mode-hook (lambda () (run-hooks 'prelude-org-mode-hook))) +(add-hook 'org-mode-hook (lambda () (run-hooks 'prelude-org-mode-hook))) (provide 'prelude-org)