diff options
author | Stephen Berman <stephen.berman@gmx.net> | 2018-08-01 14:42:57 +0200 |
---|---|---|
committer | Stephen Berman <stephen.berman@gmx.net> | 2018-08-01 14:42:57 +0200 |
commit | 22d463ed5ca262e1d8893b115c3f1237485fc7e0 (patch) | |
tree | 4dfed30b619e33c73f054dcd0075035b8a3d30fe /lisp/emacs-lisp/checkdoc.el | |
parent | cabe9e5126bfed05643d595589031cce8a404255 (diff) | |
download | emacs-22d463ed5ca262e1d8893b115c3f1237485fc7e0.tar.gz emacs-22d463ed5ca262e1d8893b115c3f1237485fc7e0.tar.bz2 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 'lisp/emacs-lisp/checkdoc.el')
0 files changed, 0 insertions, 0 deletions