summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRasmus <rasmus@gmx.us>2017-12-10 11:50:38 +0100
committerRasmus <rasmus@gmx.us>2017-12-10 12:01:09 +0100
commit3efb0007393624b555d1f1b4858e7523d8d4c4b1 (patch)
tree08dabf1a74da14f46c3b95c3899f5dc3b97e4662
parent4b80c62705723ffe1cf01820d8204baf7f0ea57a (diff)
downloadorg-mode-3efb0007393624b555d1f1b4858e7523d8d4c4b1.tar.gz
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
-rw-r--r--lisp/org-tempo.el6
1 files changed, 5 insertions, 1 deletions
diff --git a/lisp/org-tempo.el b/lisp/org-tempo.el
index 7c37c9f..6f823ba 100644
--- a/lisp/org-tempo.el
+++ b/lisp/org-tempo.el
@@ -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))