aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/double.el13
1 files changed, 13 insertions, 0 deletions
diff --git a/lisp/double.el b/lisp/double.el
index 4de4b8a1dd8..cd27f31fbb8 100644
--- a/lisp/double.el
+++ b/lisp/double.el
@@ -52,6 +52,10 @@
52 52
53;;; ChangeLog: 53;;; ChangeLog:
54 54
55;; * 1994-06-21 Per Abrahamsen
56;; Added `double-prefix-only'.
57;; * 1994-02-28 Per Abrahamsen
58;; Use 127 instead of 'delete to delete a character.
55;; * 1994-02-03 Per Abrahamsen 59;; * 1994-02-03 Per Abrahamsen
56;; Created. 60;; Created.
57 61
@@ -71,6 +75,11 @@ Each entry is a list with three elements:
712. The string to be inserted when the key is pressed once. 752. The string to be inserted when the key is pressed once.
723. The string to be inserted when the key is pressed twice.") 763. The string to be inserted when the key is pressed twice.")
73 77
78(defvar double-prefix-only t
79 "*Non-nil means that double mode mapping only works for prefix keys.
80That is, for any key `X' in `double-map', `X' alone will be mapped
81but not `C-u X' or `ESC X' since the X is not the prefix key.")
82
74;;; Read Event 83;;; Read Event
75 84
76(defvar double-last-event nil) 85(defvar double-last-event nil)
@@ -99,6 +108,10 @@ Each entry is a list with three elements:
99 (cond (unread-command-events 108 (cond (unread-command-events
100 ;; Artificial event, ignore it. 109 ;; Artificial event, ignore it.
101 (vector key)) 110 (vector key))
111 ((and double-prefix-only
112 (> (length (this-command-keys)) 1))
113 ;; This is not a prefix key, ignore it.
114 (vector key))
102 ((eq key 'magic-start) 115 ((eq key 'magic-start)
103 ;; End of generated event. See if he will repeat it... 116 ;; End of generated event. See if he will repeat it...
104 (let ((new (double-read-event prompt)) 117 (let ((new (double-read-event prompt))