summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2014-04-28 22:59:16 -0400
committerKyle Meyer <kyle@kyleam.com>2014-04-29 00:01:00 -0400
commitff40eb32de1f0cf1cf668dd65b620d1b2deed1ac (patch)
treeda6f519669c9761c28680da1887942b1d2d38a73 /lisp
parent63241affe343b3a6bcfc91527d1b58253b2e3c11 (diff)
downloademacs.d-ff40eb32de1f0cf1cf668dd65b620d1b2deed1ac.tar.gz
Move some hook bindings to mode maps
Diffstat (limited to 'lisp')
-rw-r--r--lisp/init-org.el15
-rw-r--r--lisp/init-tex.el5
2 files changed, 5 insertions, 15 deletions
diff --git a/lisp/init-org.el b/lisp/init-org.el
index f708b47..4002a89 100644
--- a/lisp/init-org.el
+++ b/lisp/init-org.el
@@ -77,6 +77,9 @@
'(progn
(define-key org-mode-map (kbd "C-c C-x B")
'km/org-tree-to-indirect-buffer-current-window)
+ (define-key org-mode-map (kbd "C-c m w") 'km/org-refile-to-other-org-buffer)
+ (define-key org-mode-map (kbd "C-c m s") 'km/org-sort-parent)
+ (define-key org-mode-map (kbd "C-c m o") 'ace-link-org)
;; Don't let `org-cycle-agenda-files' binding override custom
;; `backward-kill-word' binding (`org-cycle-agenda-files' is still bound
;; to C-,).
@@ -250,16 +253,4 @@ MAXLEVEL (defaults to 2)."
(define-key ctl-x-4-map "o" 'km/org-switch-to-buffer-other-window)
-(eval-after-load 'org
- '(add-to-list 'org-mode-hook
- '(lambda ()
- (local-set-key (kbd "C-c m w")
- 'km/org-refile-to-other-org-buffer)
- (local-set-key (kbd "C-c m W")
- 'km/org-refile-to-other-file)
- (local-set-key (kbd "C-c m s")
- 'km/org-sort-parent)
- (local-set-key (kbd "C-c m o")
- 'ace-link-org))))
-
(provide 'init-org)
diff --git a/lisp/init-tex.el b/lisp/init-tex.el
index 1eed85a..e7e79c6 100644
--- a/lisp/init-tex.el
+++ b/lisp/init-tex.el
@@ -72,9 +72,8 @@ The point should be beyond \"\\section\"."
(error "%s does not exist" pdf-file))
(start-process "tex-pdf" nil "xdg-open" pdf-file)))
-(add-hook 'LaTeX-mode-hook
- '(lambda ()
- (local-set-key (kbd "C-c m p") 'km/latex-find-pdf)))
+(eval-after-load 'latex
+ '(define-key LaTeX-mode-map (kbd "C-c m p") 'km/latex-find-pdf))
(eval-after-load 'reftex
'(diminish 'reftex-mode "Rf"))