]> git.eshelyaron.com Git - emacs.git/commitdiff
Prevent Org mode from mistakenly changing Calendar keymap
authorStephen Berman <stephen.berman@gmx.net>
Fri, 25 Jun 2021 09:11:43 +0000 (11:11 +0200)
committerStephen Berman <stephen.berman@gmx.net>
Fri, 25 Jun 2021 09:11:43 +0000 (11:11 +0200)
* 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

index 1f4e2e8308fb514f5e03995845c4a10951c4d924..b68e5b58fcafd304c9233782e93923aad976e194 100644 (file)
@@ -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)))