emacs - disable C-M-j in c/c++ mode, as it is an global binding
authorPeng Li <seudut@gmail.com>
Fri, 2 Sep 2016 03:06:35 +0000 (11:06 +0800)
committerPeng Li <seudut@gmail.com>
Fri, 2 Sep 2016 03:08:38 +0000 (11:08 +0800)
emacs.d/config.org

index 4a9a866..d39bf93 100644 (file)
@@ -1456,6 +1456,10 @@ brew install the-silver-searcher
   ;;   (add-hook 'c++-mode-local-vars-hook #'sd/c++-mode-local-vars)
 #+END_SRC
 
+** Table
+#+BEGIN_SRC emacs-lisp :tangle yes :results silent
+  (add-hook 'text-mode-hook 'table-recognize)
+#+END_SRC
 * Dired
 ** Dired bindings
 =C-o= is defined as a global key for window operation, here unset it in dired mode
@@ -1780,6 +1784,14 @@ C/C++ ide tools
 #+BEGIN_SRC emacs-lisp :tangle yes :results silent
   (setq c-default-style "stroustrup"
         c-basic-offset 4)
+
+  ;; "C-M-j" is my global binding for avy goto line below
+  ;; disable it in c mode
+  (mapcar '(lambda (map)
+             (define-key map (kbd "C-M-j") nil))
+          (list c-mode-map
+                c++-mode-map
+                objc-mode-map))
 #+END_SRC
 
 *** irony