From 2b36631ba244ad23e319385b692b6b508c8dc349 Mon Sep 17 00:00:00 2001 From: Sameer Rahmani Date: Sat, 3 Dec 2011 14:58:45 +0330 Subject: [PATCH] C autocompletion and style added --- conf/dotemacs | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/conf/dotemacs b/conf/dotemacs index d36232b..7e1242d 100644 --- a/conf/dotemacs +++ b/conf/dotemacs @@ -14,14 +14,9 @@ (add-to-list 'interpreter-mode-alist '("python" . python-mode)) (require 'python-mode) -;; Enabling ropemacs -;;(require 'pymacs) -;;(pymacs-load "ropemacs" "rope-") - -(setq ropemacs-enable-shortcuts nil) -(setq ropemacs-local-prefix "C-c C-p") - - +;; php-mode +(autoload 'php-mode "php-mode" "PHP editing mode" t) +(add-to-list 'auto-mode-alist '("\\.php\\'" . php-mode)) (require 'yasnippet) @@ -67,6 +62,7 @@ (list "--ADDR--/pyemacs.sh" (list local-file)))) (add-to-list 'flymake-allowed-file-name-masks '("\\.py$" flymake-pyflakes-init))) + ;; flymake shortkeys (global-set-key (kbd "\C-x a") 'flymake-display-err-menu-for-current-line) (global-set-key (kbd "\C-x p") 'flymake-goto-next-error) @@ -82,5 +78,25 @@ )) (global-set-key (kbd "") 'dabbrev-expand) +(autoload 'python-pylint "python-pylint") +(autoload 'pylint "python-pylint") +(global-linum-mode) + +;; clang auto completion +(require 'auto-complete-clang) +(setq clang-completion-suppress-error 't) + +(defun my-c-mode-common-hook() + (setq ac-auto-start nil) + (setq ac-expand-on-auto-complete nil) + (setq ac-quick-help-delay 0.3) + (define-key c-mode-base-map (kbd "M-3") 'ac-complete-clang) +) + +;; Linux style for c programming +(setq c-default-style '((java-mode . "java") + (awk-mode . "awk") + (other . "linux"))) + (load-file "--KUSOHOME--/src/kuso-ide.el") (kuso-mode)