]> code.delx.au - gnu-emacs/commitdiff
* calendar/todos.el (todos-item-start): Restore commented out code
authorStephen Berman <stephen.berman@gmx.net>
Fri, 2 Dec 2011 23:46:31 +0000 (00:46 +0100)
committerStephen Berman <stephen.berman@gmx.net>
Fri, 2 Dec 2011 23:46:31 +0000 (00:46 +0100)
to prevent wrongly moving point in widened buffer.

lisp/ChangeLog
lisp/calendar/todos.el

index 0ee809b5d2fcc93f51cdd6c7a534b9f6f5aa3eff..9fe801d3f069f4f21970a9b7b6d5d0c51e1c1f9a 100644 (file)
@@ -1,3 +1,8 @@
+2012-09-19  Stephen Berman  <stephen.berman@gmx.net>
+
+       * calendar/todos.el (todos-item-start): Restore commented out code
+       to prevent wrongly moving point in widened buffer.
+
 2012-09-19  Stephen Berman  <stephen.berman@gmx.net>
 
        * calendar/todos.el: Remove old commentary from todo-mode.el; add
index 34a1c10df707a5622a5092250c0215674c938680..457e49c267e295a5865027ef044dfaedc1413d77 100644 (file)
@@ -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))