Procházet zdrojové kódy

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 <lechten@wi.uni-muenster.de>
Ref: https://orgmode.org/list/87pn6n5u13.fsf@wi.uni-muenster.de
Kyle Meyer před 4 roky
rodič
revize
73c929e3b5
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. 1 1
      lisp/org-element.el

+ 1 - 1
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)