From 6cb53826696ad42e286ef7ef31e2f8c44483edb5 Mon Sep 17 00:00:00 2001 From: Carsten Dominik Date: Tue, 27 Apr 2010 07:57:22 +0200 Subject: [PATCH] Fix a bug with item demotion M-right did not work on the last item of a list. Report by Matti de Craene. --- lisp/ChangeLog | 3 +++ lisp/org-list.el | 5 +++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 914fbb013..c7c4c0966 100755 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,5 +1,8 @@ 2010-04-27 Carsten Dominik + * org-list.el (org-end-of-item-text-before-children): Also do + the right thing at the end of a file. + * org.el (org-set-packages-alist, org-get-packages-alist): New function. (org-export-latex-default-packages-alist) diff --git a/lisp/org-list.el b/lisp/org-list.el index 34deff5ee..6f2205636 100644 --- a/lisp/org-list.el +++ b/lisp/org-list.el @@ -605,8 +605,9 @@ Assumes that the cursor is in the first ine of an item." (min (save-excursion (org-end-of-item) (point)) (save-excursion (goto-char (point-at-eol)) - (re-search-forward (concat "^" (org-item-re t)) nil t) - (match-beginning 0))))) + (if (re-search-forward (concat "^" (org-item-re t)) nil 'move) + (match-beginning 0) + (point-max)))))) (defun org-next-item () "Move to the beginning of the next item in the current plain list.