aboutsummaryrefslogtreecommitdiffstats
path: root/admin
diff options
context:
space:
mode:
authorStephen Berman2018-08-01 14:42:57 +0200
committerStephen Berman2018-08-01 14:42:57 +0200
commit22d463ed5ca262e1d8893b115c3f1237485fc7e0 (patch)
tree4dfed30b619e33c73f054dcd0075035b8a3d30fe /admin
parentcabe9e5126bfed05643d595589031cce8a404255 (diff)
downloademacs-22d463ed5ca262e1d8893b115c3f1237485fc7e0.tar.gz
emacs-22d463ed5ca262e1d8893b115c3f1237485fc7e0.zip
Fix todo-mode commands called on done items separator
The done items separator is not reachable by todo-mode navigation commands, but it is e.g. by C-n and C-p. Ensure that invoking todo-mode commands with point on the separator does not result in unexpected results, errors or file corruption (bug#32343). * lisp/calendar/todo-mode.el (todo-insert-item--basic): Make copying item and inserting item "here" noops when invoked on done items separator. Consolidate error handling of these cases. Also restrict "here" insertion to valid positions in the current category, since this is simpler than the previous behavior of inserting as the first item, which was moreover undocumented, counterintuitive and superfluous. (todo-set-item-priority, todo-move-item, todo-item-done) (todo-item-start, todo-item-end): Make noops when invoked on done items separator. * test/lisp/calendar/todo-mode-tests.el: Require ert-x. (todo-test--insert-item): Add formal parameters of todo-insert-item--basic. (todo-test--done-items-separator): New function. (todo-test-done-items-separator01-bol) (todo-test-done-items-separator01-eol) (todo-test-done-items-separator02-bol) (todo-test-done-items-separator02-eol) (todo-test-done-items-separator03-bol) (todo-test-done-items-separator03-eol) (todo-test-done-items-separator04-bol) (todo-test-done-items-separator04-eol) (todo-test-done-items-separator05-bol) (todo-test-done-items-separator05-eol) (todo-test-done-items-separator06-bol) (todo-test-done-items-separator06-eol) (todo-test-done-items-separator07): New tests.
Diffstat (limited to 'admin')
0 files changed, 0 insertions, 0 deletions