diff options
author | Pierre Courtieu <courtieu@lri.fr> | 2012-08-31 11:03:16 +0000 |
---|---|---|
committer | Pierre Courtieu <courtieu@lri.fr> | 2012-08-31 11:03:16 +0000 |
commit | c97b951891a18b988816effba50612e4e9644f15 (patch) | |
tree | 889529e1cee3cda62aae9c4935e8d6ae6746ef16 | |
parent | c1525f2cca799ed8ad735404a66687180a97d0f5 (diff) |
Fixing previous commit on double hit.
-rw-r--r-- | coq/coq.el | 15 |
1 files changed, 8 insertions, 7 deletions
@@ -2676,9 +2676,8 @@ Only when three-buffer-mode is enabled." ;; Trying to have double hit on colon behave like electric terminator. -(defvar coq-double-hit-delay - "The maximum delay between the two hit of a double hit in coq/proofgeneral." - .25) +(defvar coq-double-hit-delay 0.25 + "The maximum delay between the two hit of a double hit in coq/proofgeneral.") (defvar coq-double-hit-timer nil "the timer used to watch for double hits.") @@ -2688,8 +2687,10 @@ Only when three-buffer-mode is enabled." (defun coq-unset-double-hit-hot () - (cancel-timer coq-double-hit-timer) - (setq coq-double-hit-hot nil)) + (unless (null coq-double-hit-timer) + (cancel-timer coq-double-hit-timer)) + (setq coq-double-hit-hot nil) + (setq coq-double-hit-timer nil)) (defun coq-colon-self-insert () (interactive) @@ -2703,8 +2704,8 @@ Only when three-buffer-mode is enabled." (run-with-timer coq-double-hit-delay nil 'coq-unset-double-hit-hot)))) -(define-key coq-mode-map [(.)] 'coq-colon-self-insert) -(define-key coq-mode-map ?\; 'coq-colon-self-insert) +(define-key coq-mode-map (kbd ".") 'coq-colon-self-insert) +(define-key coq-mode-map (kbd ";") 'coq-colon-self-insert) ; for french keyboards (provide 'coq) |