summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2011-03-08 23:49:39 +0100
committerNicolas Goaziou <n.goaziou@gmail.com>2011-03-08 23:49:39 +0100
commit4090006ab124dd10698f21f1ee44c913b5faf990 (patch)
tree852863430aa7e3e724094b6ad5a86945e4732281
parent11f19abcf2793ddc57bf36ac157cbfcf8c58c66c (diff)
downloadorg-mode-4090006ab124dd10698f21f1ee44c913b5faf990.tar.gz
org-list: fix confusion due to indent-tabs-mode
-rw-r--r--lisp/org-list.el10
1 files changed, 5 insertions, 5 deletions
diff --git a/lisp/org-list.el b/lisp/org-list.el
index 1906d95..430c9ff 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -1150,10 +1150,10 @@ This function modifies STRUCT."
;; BEFOREP and SPLIT-LINE-P. The difference of size
;; between what was cut and what was inserted in buffer
;; is stored in SIZE-OFFSET.
- (ind (let ((ind-ref (org-list-get-ind item struct)))
- (if (not indent-tabs-mode)
- ind-ref
- (+ (/ ind-ref tab-width) (mod ind-ref tab-width)))))
+ (ind (org-list-get-ind item struct))
+ (ind-size (if indent-tabs-mode
+ (+ (/ ind tab-width) (mod ind tab-width))
+ ind))
(bullet (org-list-bullet-string (org-list-get-bullet item struct)))
(box (when checkbox "[ ]"))
(text-cut
@@ -1170,7 +1170,7 @@ This function modifies STRUCT."
text-cut))
"")))
(item-sep (make-string (1+ blank-nb) ?\n))
- (item-size (+ ind (length body) (length item-sep)))
+ (item-size (+ ind-size (length body) (length item-sep)))
(size-offset (- item-size (length text-cut))))
;; 4. Insert effectively item into buffer
(goto-char item)