From 697bd4a3585bd7d9ef66d670d21b72a3e9a36e6a Mon Sep 17 00:00:00 2001 From: Stephen Berman Date: Sat, 3 Dec 2011 00:46:31 +0100 Subject: [PATCH] * calendar/todos.el (todos-item-start): Restore commented out code to prevent wrongly moving point in widened buffer. --- lisp/ChangeLog | 5 +++++ lisp/calendar/todos.el | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0ee809b5d2f..9fe801d3f06 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2012-09-19 Stephen Berman + + * calendar/todos.el (todos-item-start): Restore commented out code + to prevent wrongly moving point in widened buffer. + 2012-09-19 Stephen Berman * calendar/todos.el: Remove old commentary from todo-mode.el; add diff --git a/lisp/calendar/todos.el b/lisp/calendar/todos.el index 34a1c10df70..457e49c267e 100644 --- a/lisp/calendar/todos.el +++ b/lisp/calendar/todos.el @@ -3369,10 +3369,12 @@ below the todo items." (defun todos-item-start () "Move to start of current Todos item and return its position." - (unless (looking-at "^$") - ;; (or (looking-at "^$") ; last item or between done and not done - ;; ;; FIXME: need this? (was needed by abandoned todos-count-items) - ;; (looking-at (regexp-quote todos-category-beg))) + (unless (or + ;; Point is either on last item in this category or on the empty + ;; line between done and not done items. + (looking-at "^$") + ;; There are no done items in this category yet. + (looking-at (regexp-quote todos-category-beg))) (goto-char (line-beginning-position)) (while (not (looking-at todos-item-start)) (forward-line -1)) -- 2.39.5