[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orgalist 9107fae 1/3: Control empty lines between items
From: |
Nicolas Goaziou |
Subject: |
[elpa] externals/orgalist 9107fae 1/3: Control empty lines between items |
Date: |
Tue, 12 Jun 2018 17:13:03 -0400 (EDT) |
branch: externals/orgalist
commit 9107fae33a7f21ea6e90de4a7d0b80c0959d2032
Author: Nicolas Goaziou <address@hidden>
Commit: Nicolas Goaziou <address@hidden>
Control empty lines between items
* orgalist.el (orgalist-separated-items): New variable.
(orgalist-mode): Use new variable.
---
orgalist.el | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/orgalist.el b/orgalist.el
index 8cd73ee..d7f4697 100644
--- a/orgalist.el
+++ b/orgalist.el
@@ -148,6 +148,17 @@ before it is checked too."
:type 'boolean
:safe #'booleanp)
+(defcustom orgalist-separated-items 'auto
+ "When non-nil, insert an empty line before every new item.
+When set to `auto', guess if an empty line is necessary according
+to the other items in the list, or default to none if there is
+not enough information."
+ :group 'orgalist
+ :type '(choice (cons :tag "None" nil)
+ (cons :tag "Always" t)
+ (cons :tag "Auto" auto))
+ :safe #'symbolp)
+
(defcustom orgalist-radio-list-templates
'((latex-mode "% BEGIN RECEIVE ORGLST %n
% END RECEIVE ORGLST %n
@@ -768,6 +779,8 @@ C-c C-c `orgalist-check-item'"
(setq-local org-list-demote-modify-bullet nil)
(setq-local org-list-two-spaces-after-bullet-regexp nil)
(setq-local org-plain-list-ordered-item-terminator ?.)
+ (setq-local org-blank-before-new-entry
+ `((plain-list-item . ,orgalist-separated-items)))
(add-function :before-until
(local 'fill-paragraph-function)
#'orgalist--fill-item)