[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/orgalist 4e55d42: Do not consider auto filling line bef
From: |
Nicolas Goaziou |
Subject: |
[elpa] externals/orgalist 4e55d42: Do not consider auto filling line before `current-fill-column' |
Date: |
Fri, 4 May 2018 16:48:19 -0400 (EDT) |
branch: externals/orgalist
commit 4e55d42de696abbb7729aa07d00b153cb7b5c9de
Author: Nicolas Goaziou <address@hidden>
Commit: Nicolas Goaziou <address@hidden>
Do not consider auto filling line before `current-fill-column'
* orgalist.el (orgalist--auto-fill): Do not consider auto filling line
before `current-fill-column'.
The behavior is the same, but we avoid calling `orgalist--in-item-p'
in most cases.
---
orgalist.el | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/orgalist.el b/orgalist.el
index 2d5e531..808fe3a 100644
--- a/orgalist.el
+++ b/orgalist.el
@@ -502,9 +502,11 @@ Return nil outside of a list or in a blank line. This
function
is meant to be used as a piece of advice on both
`auto-fill-function' and `normal-auto-fill-function'."
(unless (org-match-line "^[ \t]*$")
- (let ((item? (orgalist--in-item-p)))
- (if item? (orgalist--call-in-item fill-function item?)
- (funcall fill-function)))))
+ (let ((fc (current-fill-column)))
+ (when (and fc (<= fc (current-column)))
+ (let ((item? (orgalist--in-item-p)))
+ (if item? (orgalist--call-in-item fill-function item?)
+ (funcall fill-function)))))))
(defun orgalist--fill-item (justify)
"Fill item as a paragraph.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [elpa] externals/orgalist 4e55d42: Do not consider auto filling line before `current-fill-column',
Nicolas Goaziou <=