diff options
author | Stephen Berman <stephen.berman@gmx.net> | 2020-08-27 13:53:22 +0200 |
---|---|---|
committer | Stephen Berman <stephen.berman@gmx.net> | 2020-08-27 13:53:22 +0200 |
commit | ed3c971534283b9af2f13e71bf975ed448f2c225 (patch) | |
tree | 935c2182b5da69a6ca48a7e9edc1bdae1ec797a1 /lisp/calendar/todo-mode.el | |
parent | 4cf5d2ebee5ac45a435c991e4c0ad12be619d26b (diff) | |
download | emacs-ed3c971534283b9af2f13e71bf975ed448f2c225.tar.gz |
Prevent spurious tabs by RET in todo-edit-mode (bug#43068)
* lisp/calendar/todo-mode.el (todo-key-bindings-t)
(todo-edit-mode-map): Remove remapping of `newline' to
`newline-and-indent'.
(todo-modes-set-1): Remove local setting of `indent-line-function'.
(todo-edit-mode): Locally set `indent-line-function' to `todo-indent'.
* test/lisp/calendar/todo-mode-tests.el (todo-test-move-item05):
Prevent interactive test failure. (Until the addition of testcat4
to todo-test-1.todo, the test passed by chance, since testcat3 is
empty and has no archived items.)
(todo-test-edit-item-date-month): Refer to bug number.
(todo-test-multiline-item-indentation-1)
(todo-test-multiline-item-indentation-2)
(todo-test-multiline-item-indentation-3): New tests.
* test/lisp/calendar/todo-mode-resources/todo-test-1.todo: Remove
spurious tabs from testcat1.
Diffstat (limited to 'lisp/calendar/todo-mode.el')
-rw-r--r-- | lisp/calendar/todo-mode.el | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index 4f513d33865..0e4446f77de 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -6440,8 +6440,7 @@ Filtered Items mode following todo (not done) items." ("i" todo-insert-item) ("k" todo-delete-item) ("m" todo-move-item) - ("u" todo-item-undone) - ([remap newline] newline-and-indent)) + ("u" todo-item-undone)) "List of key bindings for Todo mode only.") (defvar todo-key-bindings-t+a+f @@ -6507,7 +6506,6 @@ Filtered Items mode following todo (not done) items." (defvar todo-edit-mode-map (let ((map (make-sparse-keymap))) (define-key map "\C-x\C-q" 'todo-edit-quit) - (define-key map [remap newline] 'newline-and-indent) map) "Todo Edit mode keymap.") @@ -6666,7 +6664,6 @@ Added to `window-configuration-change-hook' in Todo mode." (setq-local font-lock-defaults '(todo-font-lock-keywords t)) (setq-local revert-buffer-function #'todo-revert-buffer) (setq-local tab-width todo-indent-to-here) - (setq-local indent-line-function #'todo-indent) (when todo-wrap-lines (visual-line-mode) (setq wrap-prefix (make-string todo-indent-to-here 32)))) @@ -6741,6 +6738,7 @@ Added to `window-configuration-change-hook' in Todo mode." \\{todo-edit-mode-map}" (todo-modes-set-1) + (setq-local indent-line-function #'todo-indent) (if (> (buffer-size) (- (point-max) (point-min))) ;; Editing one item in an indirect buffer, so buffer-file-name is nil. (setq-local todo-current-todo-file todo-global-current-todo-file) |