summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCarsten Dominik <carsten.dominik@gmail.com>2012-01-26 07:22:16 +0000
committerCarsten Dominik <carsten.dominik@gmail.com>2012-01-30 07:55:51 +0100
commit88c07b546d1521ff4abff0c312e44fee985a325a (patch)
tree76617e64b0ad2acd1ce1d1dd97baf5aade8b1d6e
parent4beec074d053052695c14fb3efa9e3a6f7eb729e (diff)
downloadorg-mode-88c07b546d1521ff4abff0c312e44fee985a325a.tar.gz
Make the display of the first star in an inline task optional
* lisp/org-inlinetask.el (org-inlinetask-show-first-star): New option. (org-inlinetask-fontify): Honor `org-inlinetask-show-first-star'. * lisp/org-indent.el (org-indent-set-line-properties): Honor `org-inlinetask-show-first-star'.
-rw-r--r--lisp/org-indent.el7
-rw-r--r--lisp/org-inlinetask.el15
2 files changed, 17 insertions, 5 deletions
diff --git a/lisp/org-indent.el b/lisp/org-indent.el
index 99a7584..056c22b 100644
--- a/lisp/org-indent.el
+++ b/lisp/org-indent.el
@@ -45,6 +45,7 @@
(declare-function org-inlinetask-get-task-level "org-inlinetask" ())
(declare-function org-inlinetask-in-task-p "org-inlinetask" ())
(declare-function org-list-item-body-column "org-list" (item))
+(defvar org-inlinetask-show-first-star)
(defgroup org-indent nil
"Options concerning dynamic virtual outline indentation."
@@ -293,8 +294,10 @@ Assume point is at beginning of line."
(let ((stars (aref org-indent-stars
(min l org-indent-max-levels))))
(and stars
- (concat org-indent-inlinetask-first-star
- (substring stars 1)))))
+ (if (org-bound-and-true-p org-inlinetask-show-first-star)
+ (concat org-indent-inlinetask-first-star
+ (substring stars 1))
+ stars))))
(h (aref org-indent-stars
(min l org-indent-max-levels)))
(t (aref org-indent-strings
diff --git a/lisp/org-inlinetask.el b/lisp/org-inlinetask.el
index b8e8437..7a41017 100644
--- a/lisp/org-inlinetask.el
+++ b/lisp/org-inlinetask.el
@@ -102,6 +102,12 @@ the value of this variable."
(const :tag "Off" nil)
(integer)))
+(defcustom org-inlinetask-show-first-star nil
+ "Non-nil means display the first star of an inline task as additional marker.
+When nil, the first star is not shown."
+ :tag "Org Inline Tasks"
+ :group 'org-structure)
+
(defcustom org-inlinetask-export t
"Non-nil means export inline tasks.
When nil, they will not be exported."
@@ -434,9 +440,12 @@ Either remove headline and meta data, or do special formatting."
'org-hide
'org-warning)))
(while (re-search-forward re limit t)
- (add-text-properties (match-beginning 1) (match-end 1)
- `(face ,start-face font-lock-fontified t))
- (add-text-properties (match-beginning 2) (match-end 2)
+ (if org-inlinetask-show-first-star
+ (add-text-properties (match-beginning 1) (match-end 1)
+ `(face ,start-face font-lock-fontified t)))
+ (add-text-properties (match-beginning
+ (if org-inlinetask-show-first-star 2 1))
+ (match-end 2)
'(face org-hide font-lock-fontified t))
(add-text-properties (match-beginning 3) (match-end 3)
'(face org-inlinetask font-lock-fontified t)))))