From f6b74a5649ff07ab66eac6f78f9dcb1e5211ab9d Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Tue, 20 Mar 2018 09:32:48 +0100 Subject: [PATCH] Remove `org-context-p' * lisp/org.el (org-context-p): Remove function. The function is not used anywhere, and is deprecated `org-element-at-point'. --- etc/ORG-NEWS | 2 ++ lisp/org.el | 15 --------------- 2 files changed, 2 insertions(+), 15 deletions(-) diff --git a/etc/ORG-NEWS b/etc/ORG-NEWS index bd9d2a8f7..e6559ac46 100644 --- a/etc/ORG-NEWS +++ b/etc/ORG-NEWS @@ -243,6 +243,8 @@ Use ~org-save-outline-visibility~ instead. It was not used throughout the code base. *** ~org-fix-indentation~ It was not used throughout code base. +*** ~org-context-p~ +Use ~org-element-at-point~ instead. *** ~org-try-structure-completion~ Org Tempo may be used as a replacement. See details above. ** Removed variables diff --git a/lisp/org.el b/lisp/org.el index 15bc0e83a..4e1b8e7f0 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8880,21 +8880,6 @@ definitions." (push r res)))) (delete-dups (delq nil res)))) -(defun org-context-p (&rest contexts) - "Check if local context is any of CONTEXTS. -Possible values in the list of contexts are `table', `headline', and `item'." - (let ((pos (point))) - (goto-char (point-at-bol)) - (prog1 (or (and (memq 'table contexts) - (looking-at "[ \t]*|")) - (and (memq 'headline contexts) - (looking-at org-outline-regexp)) - (and (memq 'item contexts) - (looking-at "[ \t]*\\([-+*] \\|[0-9]+[.)] \\)")) - (and (memq 'item-body contexts) - (org-in-item-p))) - (goto-char pos)))) - ;; Defined to provide a value for defcustom, since there is no ;; string-collate-greaterp in Emacs. (defun org-string-collate-greaterp (s1 s2)