# HG changeset patch # User Richard M. Stallman # Date 772308208 0 # Node ID 049bc48732d6ce83cd53b86b0f2736e52e69769b # Parent 5b6bbe9478b587dc9f0499f94c2cbade5231fe78 (double-prefix-only): New variable. (double-translate-key): Use it. diff -r 5b6bbe9478b5 -r 049bc48732d6 lisp/double.el --- a/lisp/double.el Wed Jun 22 15:30:42 1994 +0000 +++ b/lisp/double.el Wed Jun 22 18:03:28 1994 +0000 @@ -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 @@ 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 @@ (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))