Move `org-flag-region' to "org-macs.el"
* lisp/org.el (org-flag-region): Move function... * lisp/org-macs.el (org-flag-region): ... here.
This commit is contained in:
parent
8d7b6e5489
commit
2956408f75
|
@ -125,7 +125,6 @@
|
|||
(declare-function org-export-get-next-element "ox" (blob info &optional n))
|
||||
(declare-function org-export-with-backend "ox" (backend data &optional contents info))
|
||||
(declare-function org-fix-tags-on-the-fly "org" ())
|
||||
(declare-function org-flag-region "org" (from to flag spec))
|
||||
(declare-function org-get-indentation "org" (&optional line))
|
||||
(declare-function org-get-todo-state "org" ())
|
||||
(declare-function org-in-block-p "org" (names))
|
||||
|
|
|
@ -758,6 +758,18 @@ Optional argument REGEXP selects variables to clone."
|
|||
|
||||
;;; Visibility
|
||||
|
||||
(defun org-flag-region (from to flag spec)
|
||||
"Hide or show lines from FROM to TO, according to FLAG.
|
||||
SPEC is the invisibility spec, as a symbol."
|
||||
(remove-overlays from to 'invisible spec)
|
||||
;; Use `front-advance' since text right before to the beginning of
|
||||
;; the overlay belongs to the visible line than to the contents.
|
||||
(when flag
|
||||
(let ((o (make-overlay from to nil 'front-advance)))
|
||||
(overlay-put o 'evaporate t)
|
||||
(overlay-put o 'invisible spec)
|
||||
(overlay-put o 'isearch-open-invisible #'delete-overlay))))
|
||||
|
||||
(defun org-outline-overlay-data (&optional use-markers)
|
||||
"Return a list of the locations of all outline overlays.
|
||||
These are overlays with the `invisible' property value `outline'.
|
||||
|
|
12
lisp/org.el
12
lisp/org.el
|
@ -6608,18 +6608,6 @@ open and agenda-wise Org files."
|
|||
|
||||
;;; Visibility (headlines, blocks, drawers)
|
||||
|
||||
(defun org-flag-region (from to flag spec)
|
||||
"Hide or show lines from FROM to TO, according to FLAG.
|
||||
SPEC is the invisibility spec, as a symbol."
|
||||
(remove-overlays from to 'invisible spec)
|
||||
;; Use `front-advance' since text right before to the beginning of
|
||||
;; the overlay belongs to the visible line than to the contents.
|
||||
(when flag
|
||||
(let ((o (make-overlay from to nil 'front-advance)))
|
||||
(overlay-put o 'evaporate t)
|
||||
(overlay-put o 'invisible spec)
|
||||
(overlay-put o 'isearch-open-invisible #'delete-overlay))))
|
||||
|
||||
;;;; Headlines visibility
|
||||
|
||||
(defun org-show-entry ()
|
||||
|
|
Loading…
Reference in New Issue