Move `org-find-(visible|invisible)' to org-macs.el

* lisp/org.el (org-find-visible):
(org-find-invisible): Move functions...
* lisp/org-macs.el: ... here.
This commit is contained in:
Nicolas Goaziou 2020-01-11 20:15:30 +01:00
parent b1822760f4
commit 2931bef9e7
3 changed files with 12 additions and 13 deletions

View File

@ -72,7 +72,6 @@
(declare-function org-at-heading-p "org" (&optional _))
(declare-function org-end-of-subtree "org" (&optional invisible-ok to-heading))
(declare-function org-escape-code-in-string "org-src" (s))
(declare-function org-find-visible "org" ())
(declare-function org-macro-escape-arguments "org-macro" (&rest args))
(declare-function org-macro-extract-arguments "org-macro" (s))
(declare-function org-reduced-level "org" (l))

View File

@ -1092,6 +1092,18 @@ move it back by one char before doing this check."
(backward-char 1))
(org-invisible-p)))
(defun org-find-visible ()
"Return closest visible buffer position, or `point-max'"
(if (org-invisible-p)
(next-single-char-property-change (point) 'invisible)
(point)))
(defun org-find-invisible ()
"Return closest invisible buffer position, or `point-max'"
(if (org-invisible-p)
(point)
(next-single-char-property-change (point) 'invisible)))
;;; Time

View File

@ -17622,18 +17622,6 @@ this numeric value."
((org-at-table-p) (call-interactively 'org-table-hline-and-move))
(t (call-interactively 'org-insert-heading))))
(defun org-find-visible ()
"Return closest visible buffer position, or `point-max'"
(if (org-invisible-p)
(next-single-char-property-change (point) 'invisible)
(point)))
(defun org-find-invisible ()
"Return closest invisible buffer position, or `point-max'"
(if (org-invisible-p)
(point)
(next-single-char-property-change (point) 'invisible)))
(defun org-copy-visible (beg end)
"Copy the visible parts of the region."
(interactive "r")