summaryrefslogtreecommitdiff
path: root/org-fc.el
diff options
context:
space:
mode:
authorLeon Rische <leon.rische@me.com>2020-09-07 16:32:43 +0200
committerLeon Rische <leon.rische@me.com>2020-09-07 16:32:43 +0200
commit8dc66cf2ec3a815ae6d6f81db58a214036583ed4 (patch)
treec4e17f0546ce263583fdb0ad620e66c51bc7adf6 /org-fc.el
parent2a623621791a65c61d9cfeb544b8ae592a928c0a (diff)
Remove unused show/hide overlay functions
Diffstat (limited to 'org-fc.el')
-rw-r--r--org-fc.el27
1 files changed, 6 insertions, 21 deletions
diff --git a/org-fc.el b/org-fc.el
index e5ceb43..83985f8 100644
--- a/org-fc.el
+++ b/org-fc.el
@@ -934,17 +934,16 @@ Returns nil if there is no title keyword."
(defun org-fc-show-all ()
"Remove all org-fc overlays in the current buffer."
(interactive)
- (remove-overlays (point-min) (point-max) 'category 'org-fc-hidden)
- (remove-overlays (point-min) (point-max) 'category 'org-fc-visible))
+ (remove-overlays (point-min) (point-max) 'category 'org-fc))
;; Based on `outline-flag-region'
(defun org-fc-hide-region (from to &optional text face)
"Hide region FROM ... TO, optionally replacing it with TEXT.
FACE can be used to set the text face of the overlay, e.g. to
make it bold."
- ;; (remove-overlays from to 'category 'org-fc-hidden)
+ ;; (remove-overlays from to 'category 'org-fc)
(let ((o (make-overlay from to nil 'front-advance)))
- (overlay-put o 'category 'org-fc-hidden)
+ (overlay-put o 'category 'org-fc)
(overlay-put o 'evaporate t)
(if face (overlay-put o 'face face))
(if (stringp text)
@@ -957,31 +956,17 @@ make it bold."
(defun org-fc-overlay-region (from to &optional face)
"Wrap region FROM ... TO in an overlay for later hiding.
FACE can be used to set the text face of the overlay."
- ;; (remove-overlays from to 'category 'org-fc-hidden)
+ ;; (remove-overlays from to 'category 'org-fc)
(let ((o (make-overlay from to)))
(overlay-put o 'evaporate t)
(if face (overlay-put o 'face face))
(overlay-put o 'invisible nil)
- (overlay-put o 'category 'org-fc-visible)
+ (overlay-put o 'category 'org-fc)
o))
-(defun org-fc-hide-overlay (o)
- "Hide the overlay O."
- (overlay-put o 'category 'org-fc-hidden)
- (overlay-put o 'invisible t)
- (overlay-put o 'display ""))
-
-(defun org-fc-show-overlay (o &optional face)
- "Show the overlay O using an optional font FACE."
- (overlay-put o 'category 'org-fc-hidden)
- (overlay-put o 'invisible nil)
- (if face
- (overlay-put o 'face face)))
-
(defun org-fc-make-overlay (begin end &rest props)
(let ((o (make-overlay begin end)))
- ;; TODO: Rename to 'org-fc
- (overlay-put o 'category 'org-fc-visible)
+ (overlay-put o 'category 'org-fc)
(cl-loop for (prop value) on props by #'cddr do
(overlay-put o prop value))
o))