From 19f2f2699499d87186c6f580e4ec79205d59c096 Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Fri, 25 Jun 2021 11:11:43 +0200 Subject: [PATCH] Prevent Org mode from mistakenly changing Calendar keymap * lisp/org/org-compat.el (org--setup-calendar-bindings): Fix logic in test of 'org-agenda-diary-file' (bug#48199). --- lisp/org/org-compat.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/org/org-compat.el b/lisp/org/org-compat.el index 1f4e2e8308f..b68e5b58fca 100644 --- a/lisp/org/org-compat.el +++ b/lisp/org/org-compat.el @@ -1151,8 +1151,8 @@ key." ((guard (not (lookup-key calendar-mode-map "c"))) (local-set-key "c" #'org-calendar-goto-agenda)) (_ nil)) - (unless (and (boundp 'org-agenda-diary-file) - (eq org-agenda-diary-file 'diary-file)) + (when (and (boundp 'org-agenda-diary-file) + (not (eq org-agenda-diary-file 'diary-file))) (local-set-key org-calendar-insert-diary-entry-key #'org-agenda-diary-entry))) -- 2.39.2