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'.
This commit is contained in:
Nicolas Goaziou 2018-03-20 09:32:48 +01:00
parent 1af7f303d5
commit f6b74a5649
2 changed files with 2 additions and 15 deletions

View File

@ -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

View File

@ -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)