]> code.delx.au - gnu-emacs/blobdiff - lisp/calendar/todo-mode.el
Merge from origin/emacs-24
[gnu-emacs] / lisp / calendar / todo-mode.el
index c869727f4c19a60cab7c5a805f1cbe5ddca516e2..962f425ecf526aa676fbc5315fcf1e958afce67e 100644 (file)
@@ -2614,7 +2614,8 @@ meaning to raise or lower the item's priority by one."
            ;; separator.
            (when (looking-back (concat "^"
                                        (regexp-quote todo-category-done)
-                                       "\n"))
+                                       "\n")
+                                (line-beginning-position 0))
              (todo-backward-item))))
        (todo-insert-with-overlays item)
        ;; If item was marked, restore the mark.
@@ -4239,7 +4240,8 @@ the values of FILTER and FILE-LIST."
                           (if (and (eobp)
                                    (looking-back
                                     (concat (regexp-quote todo-done-string)
-                                            "\n")))
+                                            "\n")
+                                     (line-beginning-position 0)))
                               (delete-region (point) (progn
                                                        (forward-line -2)
                                                        (point))))))
@@ -4656,7 +4658,7 @@ name in `todo-directory'.  See also the documentation string of
                ;; If the item ends with a non-comment parenthesis not
                ;; followed by a period, we lose (but we inherit that
                ;; problem from the legacy code).
-               (when (looking-back "(\\(.*\\)) ")
+               (when (looking-back "(\\(.*\\)) " (line-beginning-position))
                  (setq comment (match-string 1))
                  (replace-match "")
                  (insert "[" todo-comment-string ": " comment "]"))
@@ -5350,7 +5352,8 @@ of each other."
                     (looking-at todo-done-string-start)
                     (looking-back (concat "^"
                                           (regexp-quote todo-category-done)
-                                          "\n")))
+                                          "\n")
+                                   (line-beginning-position 0)))
            (setq num 1
                  done t))
          (setq prefix (concat (propertize
@@ -5448,7 +5451,7 @@ dynamically create item insertion commands.")
 The list consists of item insertion parameters that can be passed
 as insertion command arguments in fixed positions.  If a position
 in the list is not occupied by the corresponding parameter, it is
-occupied by `nil'."
+occupied by nil."
   (let* ((arg (list (car todo-insert-item--args)))
         (args (nconc (cdr todo-insert-item--args)
                      (list (car (todo-insert-item--argsleft