1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-21 06:55:35 +00:00

org-tempo: Require `org'

This commit is contained in:
Nicolas Goaziou 2018-03-31 08:51:10 +02:00
parent 83f4627679
commit 834f6d100b

View File

@ -40,7 +40,7 @@
(require 'tempo)
(require 'cl-lib)
(declare-function org-buffer-list "org" (&optional predicate exclude-tmp))
(require 'org)
(defvar org-structure-template-alist)
@ -156,20 +156,16 @@ didn't succeed."
;;
;; Org Tempo is set up with each new Org buffer and potentially in the
;; current Org buffer.
;;
;; Tempo templates can only be added after Org is loaded as
;; `org-structure-template-alist' must be loaded.
(add-hook 'org-mode-hook 'org-tempo-setup)
(add-hook 'org-tab-before-tab-emulation-hook 'org-tempo-complete-tag)
(org-tempo-add-templates)
;; Enable Org Tempo in all open Org buffers.
(dolist (b (org-buffer-list 'files))
(with-current-buffer b (org-tempo-setup)))
(eval-after-load 'org
'(org-tempo-add-templates))
(provide 'org-tempo)
;;; org-tempo.el ends here