Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 20 additions & 5 deletions org-bullets.el
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@ Otherwise the face of the heading level is used."
:group 'org-bullets
:type 'symbol)

(defcustom org-bullets-invisible-leading-stars nil
"Invisible leading stars, instead of hidden via colour.
Instead of making leading stars of headings have the same
colour with background, make them disappear completely. Useful
if the theme used or the contents of `org-bullets-bullet-list'
makes obvious the level of the heading. Be aware that the
distance of the bullets from the left edge of the window will be
identical for all levels."
:group 'org-bullets
:type 'boolean)

(defvar org-bullets-bullet-map (make-sparse-keymap))

(defun org-bullets-level-char (level)
Expand Down Expand Up @@ -84,11 +95,15 @@ Otherwise the face of the heading level is used."
(- (match-end 0) 1)
'face
org-bullets-face-name))
(put-text-property (match-beginning 0)
(- (match-end 0) 2)
'face (list :foreground
(face-attribute
'default :background)))
(if org-bullets-invisible-leading-stars
(put-text-property (match-beginning 0)
(- (match-end 0) 2)
'display '(space . (:width 0)))
(put-text-property (match-beginning 0)
(- (match-end 0) 2)
'face (list :foreground
(face-attribute
'default :background))))
(put-text-property (match-beginning 0)
(match-end 0)
'keymap
Expand Down