Browse Source

org-list: small bug fix in org-list-struct-apply-struct

* lisp/org-list.el (org-list-struct-apply-struct): if end of list was
  at eol, for example, with list inside a block, the last list
  wouldn't be shifted. Thus, the patch ensures no blank lines is
  skipped.
Nicolas Goaziou 14 years ago
parent
commit
0850948dea
1 changed files with 2 additions and 1 deletions
  1. 2 1
      lisp/org-list.el

+ 2 - 1
lisp/org-list.el

@@ -1572,7 +1572,8 @@ Initial position of cursor is restored after the changes."
 	   ;; Start from the line before END.
 	   (lambda (end beg delta)
 	     (goto-char end)
-	     (forward-line -1)
+	     (skip-chars-backward " \r\t\n")
+	     (beginning-of-line)
 	     (while (or (> (point) beg)
 			(and (= (point) beg) (not (org-at-item-p))))
 	       (when (org-looking-at-p "^[ \t]*\\S-")