From 6681efd30c34e86ede597b5b9ec219c9358fc7eb Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Thu, 9 Jan 2014 21:59:59 +0100 Subject: [PATCH] Try something out --- lisp/org-list.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lisp/org-list.el b/lisp/org-list.el index c0cf77e..f85c19b 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -134,6 +134,8 @@ (declare-function org-export-string-as "ox" (string backend &optional body-only ext-plist)) +(declare-function org-element-type "org-element" (element)) + @@ -489,10 +491,13 @@ group 4: description tag") (t (forward-line -1))))))))))) (defun org-at-item-p () - "Is point in a line starting a hand-formatted item?" + "Non-nil when point is in a line starting a list item." (save-excursion (beginning-of-line) - (and (looking-at (org-item-re)) (org-list-in-valid-context-p)))) + (and (looking-at (org-item-re)) + (or (not (derived-mode-p 'org-mode)) + (memq (org-element-type (save-match-data (org-element-at-point))) + '(item plain-list)))))) (defun org-at-item-bullet-p () "Is point at the bullet of a plain list item?" -- 1.8.5.2