From 0ceb562b335853301c84c0b9bc72293c17723381 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Fri, 25 Aug 2023 11:33:29 +0300 Subject: [PATCH] org-fold-core--specs: Remove wrong ":alias" alias * lisp/org-fold-core.el (org-fold-core-get-folding-spec-from-alias): Do not put ":alias" as an actual alias. The code did not account that `assq' returns the whole cons cell, not just value of the alist item. --- lisp/org-fold-core.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el index e6a9d5a2b..79a99e850 100644 --- a/lisp/org-fold-core.el +++ b/lisp/org-fold-core.el @@ -424,7 +424,7 @@ Return nil when there is no matching folding spec." (unless org-fold-core--spec-symbols (dolist (spec (org-fold-core-folding-spec-list)) (push (cons spec spec) org-fold-core--spec-symbols) - (dolist (alias (assq :alias (assq spec org-fold-core--specs))) + (dolist (alias (cdr (assq :alias (assq spec org-fold-core--specs)))) (push (cons alias spec) org-fold-core--spec-symbols)))) (alist-get spec-or-alias org-fold-core--spec-symbols)))