From 9019eb07f2e4856daa8d0c08fabe65e412f4601b Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Fri, 18 Feb 2022 18:18:37 -0600 Subject: Fix +org-return-dwim to work on definition lists --- lisp/+org.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/+org.el b/lisp/+org.el index f81d9a1..77c9836 100644 --- a/lisp/+org.el +++ b/lisp/+org.el @@ -79,8 +79,13 @@ appropriate. In tables, insert a new row or end the table." (let* ((context (org-element-context)) (first-item-p (eq 'plain-list (car context))) (itemp (eq 'item (car context))) - (emptyp (eq (org-element-property :contents-begin context) - (org-element-property :contents-end context))) + (emptyp (or + ;; Empty list item (regular) + (eq (org-element-property :contents-begin context) + (org-element-property :contents-end context)) + ;; Empty list item (definition) + ;; This seems to work, with minimal testing. -- 2022-02-17 + (looking-at " *::"))) (item-child-p (+org-element-descendant-of 'item context))) ;; The original function from unpackaged just tested the (or ...) test -- cgit 1.4.1-21-gabe81