From 73c929e3b507db9ee2867d35d10c8f393ff4d38d Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Tue, 15 Sep 2020 22:50:05 -0400 Subject: [PATCH] org-element: Swap pcase patterns to avoid Emacs 24 error * lisp/org-element.el (org-element--next-mode): Reorder two patterns to sidestep an error on Emacs 24. The valid pattern introduced in 4a27b67fd (org-element: Fix property drawers parsing, 2020-04-22) makes entering Org mode in Emacs 24.5 fail with "Eager macro-expansion failure: (wrong-type-argument listp :pcase--succeed)". This seems to be due to a bug fixed in Emacs 25. Reported-by: Jens Lechtenboerger Ref: https://orgmode.org/list/87pn6n5u13.fsf@wi.uni-muenster.de --- lisp/org-element.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-element.el b/lisp/org-element.el index a693cb68d..755de8661 100644 --- a/lisp/org-element.el +++ b/lisp/org-element.el @@ -4324,7 +4324,7 @@ located inside the current one. " (if parent? (pcase type (`headline 'section) - ((and `section (guard (eq mode 'first-section))) 'top-comment) + ((and (guard (eq mode 'first-section)) `section) 'top-comment) (`inlinetask 'planning) (`plain-list 'item) (`property-drawer 'node-property)