branch: externals/org commit 41f76092c66cb26f33033143455e0837b9cf4a78 Author: Kyle Meyer <k...@kyleam.com> Commit: Kyle Meyer <k...@kyleam.com>
ob-core: Make recent change compatible with older Emacs versions * lisp/ob-core.el (org-babel-disassemble-tables): Avoid length> for compatibility with Emacs versions before 28. length> and friends were added to Emacs in 0f790464d5 (Add new predicates for sequence lengths, 2020-12-27), which hasn't yet made it into a release. --- lisp/ob-core.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 3d271f6..b039d32 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -1713,7 +1713,9 @@ of the vars, cnames and rnames." (lambda (var) (when (proper-list-p (cdr var)) (when (and (not (equal colnames "no")) - (or colnames (and (length> (cdr var) 1) + ;; Compatibility note: avoid `length>', which + ;; isn't available until Emacs 28. + (or colnames (and (> (length (cdr var)) 1) (eq (nth 1 (cdr var)) 'hline) (not (member 'hline (cddr (cdr var))))))) (let ((both (org-babel-get-colnames (cdr var))))