diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el index f0d4bc5961b..7cfec137b04 100644 --- a/lisp/calendar/todo-mode.el +++ b/lisp/calendar/todo-mode.el @@ -5751,8 +5751,9 @@ against categories in that file; otherwise complete against all categories from `todo-category-completions-files'." ;; Allow SPC to insert spaces, for adding new category names. (let ((minibuffer-local-completion-map - (copy-keymap minibuffer-local-completion-map))) - (define-key minibuffer-local-completion-map " " 'self-insert-command) + (let ((map (make-sparse-keymap))) + (set-keymap-parent map minibuffer-local-completion-map) + (define-key map " " nil)))) (let* ((add (eq match-type 'add)) (archive (eq match-type 'archive)) (file0 (when (and file (> (length todo-files) 1))