summaryrefslogtreecommitdiff
path: root/lisp/double.el
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1994-06-22 18:03:28 +0000
committerRichard M. Stallman <rms@gnu.org>1994-06-22 18:03:28 +0000
commit5867a409eebad8a6433e59c540ebdd4bccb72543 (patch)
tree0e8e09655347017433fcf69a6ed3f36cde755243 /lisp/double.el
parent1d08cb509a20afc911cc59aac31238e2cf14ba2d (diff)
downloademacs-5867a409eebad8a6433e59c540ebdd4bccb72543.tar.gz
(double-prefix-only): New variable.
(double-translate-key): Use it.
Diffstat (limited to 'lisp/double.el')
-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 @@
;;; ChangeLog:
+;; * 1994-06-21 Per Abrahamsen
+;; Added `double-prefix-only'.
+;; * 1994-02-28 Per Abrahamsen
+;; Use 127 instead of 'delete to delete a character.
;; * 1994-02-03 Per Abrahamsen
;; Created.
@@ -71,6 +75,11 @@ Each entry is a list with three elements:
2. The string to be inserted when the key is pressed once.
3. The string to be inserted when the key is pressed twice.")
+(defvar double-prefix-only t
+ "*Non-nil means that double mode mapping only works for prefix keys.
+That is, for any key `X' in `double-map', `X' alone will be mapped
+but not `C-u X' or `ESC X' since the X is not the prefix key.")
+
;;; Read Event
(defvar double-last-event nil)
@@ -99,6 +108,10 @@ Each entry is a list with three elements:
(cond (unread-command-events
;; Artificial event, ignore it.
(vector key))
+ ((and double-prefix-only
+ (> (length (this-command-keys)) 1))
+ ;; This is not a prefix key, ignore it.
+ (vector key))
((eq key 'magic-start)
;; End of generated event. See if he will repeat it...
(let ((new (double-read-event prompt))