org-tempo: Enable Tempo in all Org buffers after load

* lisp/org-tempo.el: Enable Org Tempo in all buffers after load.

Reported-by: Charles Berry <ccberry@ucsd.edu>
http://lists.gnu.org/archive/html/emacs-orgmode/2017-12/msg00172.html
This commit is contained in:
Rasmus 2017-12-10 11:50:38 +01:00
parent 4b80c62705
commit 3efb000739
1 changed files with 5 additions and 1 deletions

View File

@ -154,7 +154,11 @@ Goes through `org-structure-template-alist' and
(add-hook 'org-mode-hook 'org-tempo-setup)
(add-hook 'org-tab-before-tab-emulation-hook
'tempo-complete-tag)
(when (eq major-mode 'org-mode) (org-tempo-setup))
;; Enable Org Tempo in all open Org buffers.
(mapc (lambda (buf) (with-current-buffer buf
(when (eq major-mode 'org-mode) (org-tempo-setup))))
(buffer-list))
(eval-after-load 'org
'(org-tempo-add-templates))