(setq package-archives
'( ;;("gnu" . "
http://elpa.gnu.org/packages/")
;;("marmalade" . "
https://marmalade-repo.org/packages/")
("melpa" . "
https://melpa.org/packages/")))
;; For auto-complete:
;; Requires installing company-mode:
(add-hook 'after-init-hook 'global-company-mode)
(custom-set-faces
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(cursor ((t (:background "lightgreen" :foreground "black"))))
'(font-lock-builtin-face ((t (:foreground "SpringGreen4" :weight bold))))
'(font-lock-comment-face ((t (:foreground "SlateGrey"))))
'(font-lock-constant-face ((t (:foreground "LawnGreen"))))
'(font-lock-function-name-face ((t (:foreground "Light Green" :weight bold))))
'(font-lock-keyword-face ((t (:foreground "Green" :weight bold))))
'(font-lock-preprocessor-face ((t (:foreground "DarkOrange"))))
'(font-lock-type-face ((t (:foreground "MediumSpringGreen"))))
'(font-lock-variable-name-face ((t (:foreground "LimeGreen"))))
'(highlight ((((class color) (background dark)) (:background "DarkSlateGray")))))
;; '(font-lock-function-name-face ((((class color) (background dark)) (:foreground "LightSkyBlue" :weight bold))))
;; '(font-lock-keyword-face ((((class color) (background dark)) (:foreground "Cyan" :weight bold)))))
(custom-set-variables
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(case-fold-search t)
'(column-number-mode t)
'(cua-mode t nil (cua-base))
'(current-language-environment "Latin-1")
'(default-input-method "latin-1-prefix")
'(delete-selection-mode t nil (delsel))
'(global-font-lock-mode t nil (font-lock))
'(package-selected-packages '(rust-mode zygospore company))
'(pc-selection-mode t)
'(scroll-bar-mode 'right)
'(show-paren-mode t nil (paren))
'(tags-revert-without-query t))
;; Create my own C style
(defconst my-c-style '(
(c-basic-offset . 4)
(c-comment-only-line-offset 0 . 0)
(c-offsets-alist
(statement-block-intro . +)
(knr-argdecl-intro . 5)
(substatement-open . 0)
(label . 0)
(case-label . +)
(statement-case-open . +)
(statement-case-intro . +)
(statement-cont . +)
(arglist-intro . c-lineup-arglist-intro-after-paren)
(arglist-close . c-lineup-arglist)
(inline-open . 0))
(c-special-indent-hook . c-gnu-impose-minimum)
(c-comment-continuation-stars . "")
(c-hanging-comment-ender-p . t))
)
;; add the new C style
(c-add-style "PERSONAL" my-c-style )
(add-hook 'c-mode-hook
(lambda ()
(c-set-style "PERSONAL")))
(add-hook 'c-mode-hook
(lambda ()
(c-set-style "linux")))
;; ===== Set the highlight current line minor mode =====
;; In every buffer, the line which contains the cursor will be fully
;; highlighted
;;(global-hl-line-mode 1)
;; ========== Line by line scrolling ==========
;; This makes the buffer scroll by only a single line when the up or
;; down cursor keys push the cursor (tool-bar-mode) outside the
;; buffer. The standard emacs behaviour is to reposition the cursor in
;; the center of the screen, but this can make the scrolling confusing
(setq scroll-step 1)
;; ========== Support Wheel Mouse Scrolling ==========
(mouse-wheel-mode t)
(global-set-key (kbd "C-%") 'match-paren)
(defun match-paren (arg)
"Go to the matching paren if on a paren; otherwise insert %."
(interactive "p")
(cond ((looking-at "\\s\(") (forward-list 1) (backward-char 1))
((looking-at "\\s\)") (forward-char 1) (backward-list 1))
(t (self-insert-command (or arg 1)))))
(setq inhibit-splash-screen t)
(setq inhibit-startup-message t)
(set-background-color "black")
(set-foreground-color "ForestGreen")
(set-cursor-color "lightgreen")
(global-unset-key "\347")
(global-unset-key "\347b")
(global-unset-key "\347d")
(global-unset-key "\347i")
(global-unset-key "\347l")
(global-unset-key "\347u")
(global-unset-key "\347o")
(global-unset-key "\347 ")
(global-set-key "\347" (quote goto-line))
;(set-face-font 'default "-*-courier-medium-r-normal-*-64-*-*-*-*-*-iso8859-1")
(put 'upcase-region 'disabled nil)
;; ========== Automatically re-visit TAGS file if changed ==========
(setq tags-revert-without-query t)
;;BEGIN JDE/2.2.4 DON'T REMOVE -- INSERTED BY MODULE
;;(add-to-list 'load-path(expand-file-name "/app/jde/2.2.4"))
;;(add-to-list 'load-path(expand-file-name "/app/jde/semantic"))
;;(add-to-list 'load-path(expand-file-name "/app/jde/speedbar"))
;;(add-to-list 'load-path(expand-file-name "/app/jde/eieio"))
;;(add-to-list 'load-path(expand-file-name "/app/jde/elib"))
;;(require 'jde)
;;END JDE/2.2.4
(setq-default tab-width 4)
(setq x-select-enable-clipboard t)
(setq interprogram-paste-function 'x-selection-value)
;;(set-default-font "Monospace-9")
(setq company-idle-delay 0.2)
(setq company-minimum-prefix-length 2)
(global-company-mode t)
(define-key global-map "\M-n" 'pop-tag-mark)
(setq-default indent-tabs-mode nil)