From: Stephen Berman Date: Fri, 2 Dec 2011 23:46:31 +0000 (+0100) Subject: * calendar/todos.el (todos-item-start): Restore commented out code X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2124 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=697bd4a3585bd7d9ef66d670d21b72a3e9a36e6a;p=emacs.git * calendar/todos.el (todos-item-start): Restore commented out code to prevent wrongly moving point in widened buffer. --- 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))