Function: double-mode
double-mode is an autoloaded, interactive and byte-compiled function
defined in double.el.gz.
Signature
(double-mode &optional ARG)
Documentation
Toggle special insertion on double keypresses (Double mode).
When Double mode is enabled, some keys will insert different
strings when pressed twice. See double-map for details.
This is a minor mode. If called interactively, toggle the Double mode
mode. If the prefix argument is positive, enable the mode, and if it is
zero or negative, disable the mode.
If called from Lisp, toggle the mode if ARG is toggle. Enable the
mode if ARG is nil, omitted, or is a positive number. Disable the mode
if ARG is a negative number.
To check whether the minor mode is enabled in the current buffer,
evaluate the variable double-mode(var)/double-mode(fun).
The mode's hook is called both when the mode is enabled and when it is disabled.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/double.el.gz
;;; Mode
;;;###autoload
(define-minor-mode double-mode
"Toggle special insertion on double keypresses (Double mode).
When Double mode is enabled, some keys will insert different
strings when pressed twice. See `double-map' for details."
:lighter " Double"
:link '(emacs-commentary-link "double")
(kill-local-variable 'key-translation-map)
(when double-mode
;; Set up key-translation-map as indicated by `double-map'.
;; XXX I don't think key-translation-map should be made local here. -- Lorentey
(make-local-variable 'key-translation-map)
(let ((map (make-sparse-keymap)))
(set-keymap-parent map key-translation-map)
(setq key-translation-map map)
(dolist (entry (append double-map '((magic-start) (magic-end))))
(define-key map
(vector (nth 0 entry)) 'double-translate-key)))))