Browse Source

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'.
Nicolas Goaziou 7 years ago
parent
commit
f6b74a5649
2 changed files with 2 additions and 15 deletions
  1. 2 0
      etc/ORG-NEWS
  2. 0 15
      lisp/org.el

+ 2 - 0
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

+ 0 - 15
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)