org-capture.el (org-capture-mode): Fix bug: don't run the mode's hook twice

* org-capture.el (org-capture-mode): Fix bug: don't run the
mode's hook twice.

Thanks to Kalev Takkis for reporting this.
This commit is contained in:
Bastien Guerry 2012-09-24 07:07:43 +02:00
parent 5a297114fa
commit ec9f52d185

View file

@ -418,12 +418,13 @@ for a capture buffer.")
"Hook for the minor `org-capture-mode'.")
(define-minor-mode org-capture-mode
"Minor mode for special key bindings in a capture buffer."
"Minor mode for special key bindings in a capture buffer.
Turning on this mode runs the normal hook `org-capture-mode-hook'."
nil " Rem" org-capture-mode-map
(org-set-local
'header-line-format
"Capture buffer. Finish `C-c C-c', refile `C-c C-w', abort `C-c C-k'.")
(run-hooks 'org-capture-mode-hook))
"Capture buffer. Finish `C-c C-c', refile `C-c C-w', abort `C-c C-k'."))
(define-key org-capture-mode-map "\C-c\C-c" 'org-capture-finalize)
(define-key org-capture-mode-map "\C-c\C-k" 'org-capture-kill)
(define-key org-capture-mode-map "\C-c\C-w" 'org-capture-refile)