]> git.eshelyaron.com Git - emacs.git/commit
Fix several todo-mode.el editing bugs (bug#42976)
authorStephen Berman <stephen.berman@gmx.net>
Fri, 21 Aug 2020 20:41:48 +0000 (22:41 +0200)
committerStephen Berman <stephen.berman@gmx.net>
Fri, 21 Aug 2020 20:41:48 +0000 (22:41 +0200)
commit36bf4fa0b3ceef56a89ca657ce82bdc7ea10203f
treeacc20ffbde7af6f1b248233805c0d8a2c2f8c353
parent3e10174fb65f4eb601b1921271bdcf10c933b879
Fix several todo-mode.el editing bugs (bug#42976)

* lisp/calendar/todo-mode.el (todo-insert-item--basic): Ensure the
target todo file is in todo-mode.
(todo-edit-item--text): When editing a done item comment, prevent
clobbering match data on finishing the edit.
(todo-edit-item--header): Ensure that decrementing the month of
the date header works for intervals greater than a year, and when
incrementing or decrementing the month crosses one or more years,
adjust the year as needed.
(todo-read-category): If we're outside of todo-mode and there is a
current todo file, use it; otherwise, use the default todo file.

* test/lisp/calendar/todo-mode-tests.el
(todo-test-edit-item-date-month): New test.

* test/lisp/calendar/todo-mode-resources/todo-test-1.todo: Modify
to accommodate new test.
lisp/calendar/todo-mode.el
test/lisp/calendar/todo-mode-resources/todo-test-1.todo
test/lisp/calendar/todo-mode-tests.el