-;;; double.el --- Support for keyboard remapping with double clicking
+;;; double.el --- support for keyboard remapping with double clicking
;; Copyright (C) 1994, 1997, 1998 Free Software Foundation, Inc.
;; Set up key-translation-map as indicated by `double-map'.
(kill-local-variable 'key-translation-map)
(make-local-variable 'key-translation-map)
- (setq key-translation-map (copy-keymap key-translation-map))
+ (setq key-translation-map (if (keymapp key-translation-map)
+ (copy-keymap key-translation-map)
+ (make-sparse-keymap)))
(mapcar (function (lambda (entry)
(define-key key-translation-map
(vector (nth 0 entry))
;;; Mode
-(defvar double-mode nil)
-;; Indicator for the double mode.
- (make-variable-buffer-local 'double-mode)
+;;;###autoload
+(defcustom double-mode nil
+ "Toggle Double mode.
+Setting this variable directly does not take effect;
+use either \\[customize] or the function `double-mode'."
+ :set (lambda (symbol value)
+ (double-mode (if value 1 0)))
+ :initialize 'custom-initialize-default
+ :link '(emacs-commentary-link "double")
+ :type 'boolean
+ :require 'double
+ :group 'double)
+(make-variable-buffer-local 'double-mode)
(or (assq 'double-mode minor-mode-alist)
(setq minor-mode-alist
(provide 'double)
;;; double.el ends here
-