Переглянути джерело

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.
Nicolas Goaziou 5 роки тому
батько
коміт
2931bef9e7
3 змінених файлів з 12 додано та 13 видалено
  1. 0 1
      lisp/org-element.el
  2. 12 0
      lisp/org-macs.el
  3. 0 12
      lisp/org.el

+ 0 - 1
lisp/org-element.el

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

+ 12 - 0
lisp/org-macs.el

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

+ 0 - 12
lisp/org.el

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