[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-modern 067f9319d6: Go back to using the invisible p
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-modern 067f9319d6: Go back to using the invisible property again |
Date: |
Fri, 9 Dec 2022 14:57:58 -0500 (EST) |
branch: externals/org-modern
commit 067f9319d67b1170d46a394e039537bb9cb413e3
Author: Daniel Mendler <mail@daniel-mendler.de>
Commit: Daniel Mendler <mail@daniel-mendler.de>
Go back to using the invisible property again
Otherwise we break the speed keys. Fix #103, Fix #106
---
org-modern.el | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/org-modern.el b/org-modern.el
index 37945c1bbc..6038f736f4 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -317,7 +317,7 @@ the font.")
(unless rep
(setq rep (cdr (assq t org-modern-keyword)) end (match-end 1)))
(pcase rep
- ('t (put-text-property beg (match-end 1) 'display ""))
+ ('t (put-text-property beg (match-end 1) 'invisible 'org-modern))
((pred stringp)
(put-text-property beg end 'display rep)))))
@@ -485,12 +485,12 @@ the font.")
(pcase rep
('t
(add-face-text-property beg-name end-name 'org-modern-block-name)
- (put-text-property (if fringe beg-ind beg-rep) beg-name 'display ""))
+ (put-text-property (if fringe beg-ind beg-rep) beg-name 'invisible
'org-modern))
((pred stringp)
(add-face-text-property beg-name end-name 'org-modern-block-name)
(put-text-property beg-rep end-rep 'display rep)
(when fringe
- (put-text-property beg-ind beg-rep 'display ""))))))
+ (put-text-property beg-ind beg-rep 'invisible 'org-modern))))))
(defun org-modern--block-fringe ()
"Prettify blocks with fringe bitmaps."
@@ -603,8 +603,8 @@ the font.")
,@(and (not (eq org-modern-hide-stars t))
(or org-modern-star (stringp org-modern-hide-stars))
'((0 (org-modern--star))))
- ,@(and (eq org-modern-hide-stars 'leading) '((1 '(face nil display
""))))
- ,@(and (eq org-modern-hide-stars t) '((0 '(face nil display "")))))))
+ ,@(and (eq org-modern-hide-stars 'leading) '((1 '(face nil invisible
org-modern))))
+ ,@(and (eq org-modern-hide-stars t) '((0 '(face nil invisible
org-modern)))))))
(when org-modern-horizontal-rule
`(("^[ \t]*-\\{5,\\}$" 0
'(face org-modern-horizontal-rule display
@@ -635,14 +635,14 @@ the font.")
(1 '(face nil display ,(org-modern--symbol (car
org-modern-internal-target))))
(3 '(face nil display ,(org-modern--symbol (caddr
org-modern-internal-target))))
,@(unless (cadr org-modern-internal-target)
- '((2 '(face nil display "")))))))
+ '((2 '(face nil invisible org-modern)))))))
(when org-modern-radio-target
`((,(format "\\(<<<\\)%s\\(>>>\\)" target)
(0 '(face org-modern-radio-target) t)
(1 '(face nil display ,(org-modern--symbol (car
org-modern-radio-target))))
(3 '(face nil display ,(org-modern--symbol (caddr
org-modern-radio-target))))
,@(unless (cadr org-modern-radio-target)
- '((2 '(face nil display "")))))))))
+ '((2 '(face nil invisible org-modern)))))))))
(when org-modern-timestamp
'(("\\(?:<\\|\\[\\)\\([0-9]\\{4\\}-[0-9]\\{2\\}-[0-9]\\{2\\}\\(?:
[[:word:]]+\\.?\\)?\\(?: [.+-]+[0-9ymwdh/]+\\)*\\)\\(\\(?: [0-9:-]+\\)?\\(?:
[.+-]+[0-9ymwdh/]+\\)*\\)\\(?:>\\|\\]\\)"
(0 (org-modern--timestamp)))
@@ -658,7 +658,7 @@ the font.")
(when org-modern-keyword
`(("^[ \t]*\\(#\\+\\)\\([^: \t\n]+\\):"
,@(pcase org-modern-keyword
- ('t '(1 '(face nil display "")))
+ ('t '(1 '(face nil invisible org-modern)))
((pred stringp) `(1 '(face nil display ,org-modern-keyword)))
(_ '(0 (org-modern--keyword)))))))
;; Do not add source block fringe markers if org-indent-mode is
@@ -670,9 +670,9 @@ the font.")
(when org-modern-block-name
(let* ((indent (and org-modern-block-fringe
(not (bound-and-true-p org-indent-mode))
- '((1 '(face nil display "")))))
+ '((1 '(face nil invisible org-modern)))))
(name '(3 'org-modern-block-name append))
- (hide `(,@indent (2 '(face nil display "")) ,name))
+ (hide `(,@indent (2 '(face nil invisible org-modern)) ,name))
(specs
(pcase org-modern-block-name
('t ;; Hide
@@ -694,6 +694,7 @@ the font.")
:group 'org-modern
(cond
(org-modern-mode
+ (add-to-invisibility-spec 'org-modern)
(setq
org-modern--star-cache
(vconcat (mapcar #'org-modern--symbol org-modern-star))
@@ -718,6 +719,7 @@ the font.")
(org-modern--update-label-face)
(org-modern--update-fringe-bitmaps))
(t
+ (remove-from-invisibility-spec 'org-modern)
(font-lock-remove-keywords nil org-modern--font-lock-keywords)
(font-lock-add-keywords nil org-font-lock-keywords)
(setq-local font-lock-unfontify-region-function #'org-unfontify-region)
@@ -734,14 +736,16 @@ the font.")
(append
;; Only remove line-prefix and wrap-prefix if org-indent-mode is
disabled.
(if (bound-and-true-p org-indent-mode)
- '(display)
- '(wrap-prefix line-prefix display))
+ '(display invisible)
+ '(wrap-prefix line-prefix display invisible))
font-lock-extra-managed-props)))
(org-unfontify-region beg end)))
;;;###autoload
(defun org-modern-agenda ()
"Finalize Org agenda highlighting."
+ (remove-from-invisibility-spec 'org-modern)
+ (add-to-invisibility-spec 'org-modern) ;; Not idempotent?!
(add-hook 'pre-redisplay-functions #'org-modern--pre-redisplay nil 'local)
(save-excursion
(save-match-data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/org-modern 067f9319d6: Go back to using the invisible property again,
ELPA Syncer <=