camlspotter avatar camlspotter committed 72dae86

bug fix (TAB and <tab>)

Comments (0)

Files changed (1)

  
 ;; 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))
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.