diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-02-11 11:44:55 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2018-02-11 11:45:07 +0100 |
commit | 6cb6ddc67155356e56db9fc587625e938d51155a (patch) | |
tree | d22f8b97bb946b8eaabbe2397177777cdaacbc74 | |
parent | f487fccbec50116986f85fc413f29fd2f3f463df (diff) | |
download | org-mode-6cb6ddc67155356e56db9fc587625e938d51155a.tar.gz |
org-macs.el: Tiny re-ordering
-rw-r--r-- | lisp/org-macs.el | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/lisp/org-macs.el b/lisp/org-macs.el index 6b3de45..f919dad 100644 --- a/lisp/org-macs.el +++ b/lisp/org-macs.el @@ -277,6 +277,18 @@ If DELETE is non-nil, delete all those overlays." (delete (delete-overlay ov)) (t (push ov found)))))) +(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)))) + ;;; Indentation @@ -767,21 +779,6 @@ Optional argument REGEXP selects variables to clone." (or (null regexp) (string-match-p regexp (symbol-name name)))) (ignore-errors (set (make-local-variable name) value))))))) - -;;; 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)))) - ;;; Miscellaneous |