[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org-modern 649f5d309a 098/105: org-modern: incorporate
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org-modern 649f5d309a 098/105: org-modern: incorporate and auto-enable org-modern-indent |
Date: |
Tue, 15 Apr 2025 13:01:07 -0400 (EDT) |
branch: externals/org-modern
commit 649f5d309a71d220826ac1437a58a8d4d7c4316b
Author: JD Smith <93749+jdtsmith@users.noreply.github.com>
Commit: JD Smith <93749+jdtsmith@users.noreply.github.com>
org-modern: incorporate and auto-enable org-modern-indent
---
org-modern.el | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/org-modern.el b/org-modern.el
index 22b3cba928..152e96f3ac 100644
--- a/org-modern.el
+++ b/org-modern.el
@@ -225,6 +225,11 @@ which specifies the offset of the block border from the
edge of
the window."
:type '(choice boolean natnum))
+(defcustom org-modern-indent-block t
+ "Whether to style indented blocks when using `org-indent'.
+See `org-modern-indent-mode'."
+ :type 'boolean)
+
(defcustom org-modern-keyword t
"Prettify keywords like #+title.
If set to t, the prefix #+ will be hidden. If set to a string,
@@ -377,6 +382,9 @@ the font.")
(defconst org-modern--table-overline '(:overline t))
(defconst org-modern--table-sp '((space :width (org-modern--table-sp-width))
(space :width (org-modern--table-sp-width))))
+(defvar org-indent-mode)
+(defvar org-modern-indent-mode)
+(declare-function org-modern-indent-mode "org-modern-indent")
(defun org-modern--checkbox ()
"Prettify checkboxes according to `org-modern-checkbox'."
@@ -796,7 +804,7 @@ whole buffer; otherwise, for the line at point."
(2 '(face org-modern-label display #(" " 0 1 (face (:strike-through
t)))) t))))
;; Do not add source block fringe markers if org-indent-mode is
;; enabled. org-indent-mode uses line prefixes for indentation.
- ;; Therefore we cannot have both.
+ ;; org-modern-indent handles this.
(when (and org-modern-block-fringe (not (bound-and-true-p org-indent-mode)))
'(("^[ \t]*#\\+\\(?:begin\\|BEGIN\\)_\\S-"
(0 (org-modern--block-fringe)))))
@@ -862,7 +870,9 @@ whole buffer; otherwise, for the line at point."
(when (eq org-modern-star 'fold)
(add-hook 'org-cycle-hook #'org-modern--cycle nil 'local))
(org-modern--update-faces)
- (org-modern--update-bitmaps))
+ (org-modern--update-bitmaps)
+ (when (and org-indent-mode org-modern-indent-block)
+ (org-modern-indent-mode 1)))
(t
(remove-from-invisibility-spec 'org-modern)
(font-lock-remove-keywords nil org-modern--font-lock-keywords)
@@ -872,7 +882,8 @@ whole buffer; otherwise, for the line at point."
(remove-hook 'org-after-promote-entry-hook #'org-modern--unfontify-line
'local)
(remove-hook 'org-after-demote-entry-hook #'org-modern--unfontify-line
'local)
(when (eq org-modern-star 'fold)
- (remove-hook 'org-cycle-hook #'org-modern--cycle 'local))))
+ (remove-hook 'org-cycle-hook #'org-modern--cycle 'local))
+ (when org-modern-indent-mode (org-modern-indent-mode 0))))
(without-restriction
(with-silent-modifications
(org-modern--unfontify (point-min) (point-max)))
- [elpa] externals/org-modern 664cff0dd1 079/105: Fix name of bracket face, (continued)
- [elpa] externals/org-modern 664cff0dd1 079/105: Fix name of bracket face, ELPA Syncer, 2025/04/15
- [elpa] externals/org-modern fa57160a7a 100/105: README.org: correct link, ELPA Syncer, 2025/04/15
- [elpa] externals/org-modern fa960e27f6 036/105: README: describe new v0.1 functionality, ELPA Syncer, 2025/04/15
- [elpa] externals/org-modern ff10d3dd2f 026/105: Update README.md, ELPA Syncer, 2025/04/15
- [elpa] externals/org-modern d65e773ee2 037/105: Update README.md, ELPA Syncer, 2025/04/15
- [elpa] externals/org-modern d78edc6be4 059/105: remove vestigial vars, ELPA Syncer, 2025/04/15
- [elpa] externals/org-modern 3cba802e1c 058/105: give up after 5 init attempts, and reuse timer, ELPA Syncer, 2025/04/15
- [elpa] externals/org-modern e4ba473d3e 049/105: README: improve re-indent description, ELPA Syncer, 2025/04/15
- [elpa] externals/org-modern 400e1d0fce 068/105: Update README.md, ELPA Syncer, 2025/04/15
- [elpa] externals/org-modern 6ec22d3d74 087/105: walk-blocks: avoid visiting first block twice, ELPA Syncer, 2025/04/15
- [elpa] externals/org-modern 649f5d309a 098/105: org-modern: incorporate and auto-enable org-modern-indent,
ELPA Syncer <=
- [elpa] externals/org-modern 2b3ee1f8cb 082/105: README: Update screenshot, ELPA Syncer, 2025/04/15