summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-02-18 18:18:37 -0600
committerCase Duckworth2022-02-18 18:18:37 -0600
commit9019eb07f2e4856daa8d0c08fabe65e412f4601b (patch)
tree17680d0dfd2948e4d5ee9f9528086956b9c4ca36
parentStub out +link-hint-define-keyword (diff)
downloademacs-9019eb07f2e4856daa8d0c08fabe65e412f4601b.tar.gz
emacs-9019eb07f2e4856daa8d0c08fabe65e412f4601b.zip
Fix +org-return-dwim to work on definition lists
-rw-r--r--lisp/+org.el9
1 files 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."
79 (let* ((context (org-element-context)) 79 (let* ((context (org-element-context))
80 (first-item-p (eq 'plain-list (car context))) 80 (first-item-p (eq 'plain-list (car context)))
81 (itemp (eq 'item (car context))) 81 (itemp (eq 'item (car context)))
82 (emptyp (eq (org-element-property :contents-begin context) 82 (emptyp (or
83 (org-element-property :contents-end context))) 83 ;; Empty list item (regular)
84 (eq (org-element-property :contents-begin context)
85 (org-element-property :contents-end context))
86 ;; Empty list item (definition)
87 ;; This seems to work, with minimal testing. -- 2022-02-17
88 (looking-at " *::")))
84 (item-child-p 89 (item-child-p
85 (+org-element-descendant-of 'item context))) 90 (+org-element-descendant-of 'item context)))
86 ;; The original function from unpackaged just tested the (or ...) test 91 ;; The original function from unpackaged just tested the (or ...) test