From: Stephen Berman Date: Fri, 25 Jun 2021 09:11:43 +0000 (+0200) Subject: Prevent Org mode from mistakenly changing Calendar keymap X-Git-Tag: emacs-28.0.90~2035 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=19f2f2699499d87186c6f580e4ec79205d59c096;p=emacs.git 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). --- 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)))