summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Goaziou <n.goaziou@gmail.com>2010-07-13 14:40:39 +0200
committerNicolas Goaziou <n.goaziou@gmail.com>2010-09-01 19:05:45 +0200
commita63ecfa89b12a713e358e492665267d47532a13e (patch)
tree4ce440462035b59f51f722967a2823fa32908b6c
parentfe42a5e83ec543b8673535574e896c5b5b24f326 (diff)
downloadorg-mode-a63ecfa89b12a713e358e492665267d47532a13e.tar.gz
Better handling of non-blank-lines types of list enders.
* org-exp.el (org-export-mark-list-ending): fix number of blank lines inserted after a list. * org-list.el (org-list-parse-list): fix case when `org-list-end-re' would have an indentation greater than current list.
-rw-r--r--lisp/org-exp.el2
-rw-r--r--lisp/org-list.el2
2 files changed, 2 insertions, 2 deletions
diff --git a/lisp/org-exp.el b/lisp/org-exp.el
index 0ed06d1..2665f96 100644
--- a/lisp/org-exp.el
+++ b/lisp/org-exp.el
@@ -1651,7 +1651,7 @@ These special cookies will later be interpreted by the backend.
(funcall process-buffer "ORG-LIST-END\n"))
;; 3. Others backends do not need to know this: clean list enders.
(t
- (funcall process-buffer "\n")))))
+ (funcall process-buffer "")))))
(defun org-export-attach-captions-and-attributes (backend target-alist)
"Move #+CAPTION, #+ATTR_BACKEND, and #+LABEL text into text properties.
diff --git a/lisp/org-list.el b/lisp/org-list.el
index bb6015c..67c26ec 100644
--- a/lisp/org-list.el
+++ b/lisp/org-list.el
@@ -1319,7 +1319,7 @@ sublevels as a list of strings."
(let* ((indent1 (org-get-indentation))
(nextitem (or (org-get-next-item (point) end) end))
(item (org-trim (buffer-substring (point) (org-end-of-item-text-before-children))))
- (nextindent (org-get-indentation))
+ (nextindent (if (= (point) end) 0 (org-get-indentation)))
(item (if (string-match "^\\[\\([xX ]\\)\\]" item)
(replace-match (if (equal (match-string 1 item) " ")
"[CBOFF]"