Browse Source

org-compat.el: Require 'org-agenda in a timely fashion

* lisp/org-compat.el ("calendar"): Require 'org-agenda before
adding `org--setup-calendar-bindings' to `calendar-mode-hook'.

This fixes Emacs bug#38592.
Bastien 4 months ago
parent
commit
2f30ecffdf
1 changed files with 3 additions and 1 deletions
  1. 3 1
      lisp/org-compat.el

+ 3 - 1
lisp/org-compat.el

@@ -1048,7 +1048,9 @@ key."
 		   #'org-agenda-diary-entry)))
 
 (eval-after-load "calendar"
-  '(add-hook 'calendar-mode-hook #'org--setup-calendar-bindings))
+  '(progn
+     (require 'org-agenda)
+     (add-hook 'calendar-mode-hook #'org--setup-calendar-bindings)))
 
 ;;;; Saveplace