Commit 008a04ac authored by Robert Pluim's avatar Robert Pluim Committed by Stephen Berman
Browse files

todo-mode.el: Restore point on setting item done (Bug#19727)

calendar/todo-mode.el (todo-item-done): When done items are hidden,
restore point to its location prior to invoking this command.
parent 9615c0de
2015-02-04 Robert Pluim <rpluim@gmail.com> (tiny change)
* calendar/todo-mode.el (todo-item-done): When done items are
hidden, restore point to its location prior to invoking this
command. (Bug#19727)
2015-02-04 Eli Zaretskii <eliz@gnu.org>
 
* textmodes/artist.el (artist-ellipse-compute-fill-info): Use
......
......@@ -2816,7 +2816,8 @@ visible."
(goto-char (point-min))
(re-search-forward todo-done-string-start nil t)))
(buffer-read-only nil)
item done-item opoint)
item done-item
(opoint (point)))
;; Don't add empty comment to done item.
(setq comment (unless (zerop (length comment))
(concat " [" todo-comment-string ": " comment "]")))
......@@ -2854,7 +2855,9 @@ visible."
(todo-update-categories-sexp)
(let ((todo-show-with-done show-done))
(todo-category-select)
;; When done items are shown, put cursor on first just done item.
;; When done items are visible, put point at the top of the
;; done items section. When done items are hidden, restore
;; point to its location prior to invoking this command.
(when opoint (goto-char opoint)))))))
(defun todo-item-undone ()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment