Commits

camlspotter  committed 72dae86

bug fix (TAB and <tab>)

  • Participants
  • Parent commits 4ceab33

Comments (0)

Files changed (1)

File offside-trap.el

  
 ;; offside trap sticky mode keymap (borrowed from isearch.el)
 (defvar offside-trap-sticky-mode-map
-  (let ((i 0)
-	(map (make-keymap)))
+  (let ((map (make-keymap)))
     (or (char-table-p (nth 1 map))
 	(error "The initialization of offside-trap-sticky-mode-map must be updated"))
     ;; Default binding: exit
     (define-key map [t] 'offside-trap-other-char)
+    (define-key map (kbd "<C-tab>") 'offside-trap-block-indent-step)
     (define-key map (kbd "TAB") 'offside-trap-block-indent-step)
-    (define-key map (kbd "<C-tab>") 'offside-trap-block-indent-step)
+    (define-key map (kbd "<tab>") 'offside-trap-block-indent-step)
 
     map)
   "Keymap for `offside-trap-sticky-mode'.")
   (let ((keymap (make-sparse-keymap)))
     (define-key keymap (kbd "RET") 'offside-trap-haskell-indentation-newline-and-block-indent)
     (define-key keymap (kbd "TAB") 'offside-trap-block-indent)
+    (define-key keymap (kbd "<tab>") 'offside-trap-block-indent)
     ; gnome-terminal users: stop using it. It does not catch contrl modifier with return or tab.
     (define-key keymap (kbd "<C-return>") 'haskell-newline-and-indent)
     (define-key keymap (kbd "<C-tab>") 'indent-for-tab-command)
 ;; offside trap mode keymap (borrowed from isearch.el)
 (defvar offside-trap-haskell-indent-mode-map
   (let ((keymap (make-sparse-keymap)))
-    (define-key keymap (kbd "C-j") 'offside-trap-haskell-indent-newline-and-block-indent)
+    (define-key keymap (kbd "RET") 'offside-trap-haskell-indent-newline-and-block-indent)
     (define-key keymap (kbd "TAB") 'offside-trap-block-indent)
-    ; gnome-terminal users: stop using it. It does not catch contrl modifier with return or tab.
+    (define-key keymap (kbd "<tab>") 'offside-trap-block-indent)
+    ; gnome-terminal users: stop using it. It does not catch control modifier with return or tab.
     (define-key keymap (kbd "<C-return>") 'newline)
     (define-key keymap (kbd "<C-tab>") 'indent-for-tab-command)
     keymap))