[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
master 7f80070232a: Fix todo-mode item insertion bug (bug#70937)
From: |
Stephen Berman |
Subject: |
master 7f80070232a: Fix todo-mode item insertion bug (bug#70937) |
Date: |
Tue, 21 May 2024 05:04:26 -0400 (EDT) |
branch: master
commit 7f80070232a5c010ae18de9fd8803a66623c074b
Author: Stephen Berman <stephen.berman@gmx.net>
Commit: Stephen Berman <stephen.berman@gmx.net>
Fix todo-mode item insertion bug (bug#70937)
* lisp/calendar/todo-mode.el (todo-insert-item--next-param):
Initially assign each key in todo-mode-map a function identifying
it as invalid for item insertion, thus preventing mistakenly
pressing a key from executing an unwanted different todo-mode
command; the actual item insertion keys are redefined when looping
over the item insertion parameters.
---
lisp/calendar/todo-mode.el | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)
diff --git a/lisp/calendar/todo-mode.el b/lisp/calendar/todo-mode.el
index 12287299a7f..76fd4f497a4 100644
--- a/lisp/calendar/todo-mode.el
+++ b/lisp/calendar/todo-mode.el
@@ -5794,7 +5794,24 @@ keys already entered and those still available."
(apply #'todo-insert-item--basic (nconc arg parlist)))))
;; Operate on a copy of the parameter list so the original is
;; not consumed, thus available for the next key typed.
- (params0 params))
+ (params0 params)
+ (tm-keys (let (l)
+ (map-keymap (lambda (key _binding)
+ (push key l))
+ todo-mode-map)
+ l)))
+ ;; Initially assign each key in todo-mode-map a function identifying
+ ;; it as invalid for item insertion, thus preventing mistakenly
+ ;; pressing a key from executing an unwanted different todo-mode
+ ;; command (bug#70937); the actual item insertion keys are redefined
+ ;; when looping over the item insertion parameters.
+ (dolist (k tm-keys)
+ (when (characterp k)
+ (define-key map (string k)
+ (lambda ()
+ (interactive)
+ (message (concat "`%s' is not a valid remaining item insertion
key")
+ (string k))))))
(when last
(if (memq last '(default copy))
(progn
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- master 7f80070232a: Fix todo-mode item insertion bug (bug#70937),
Stephen Berman <=