Indentation

Everyone has a different indentation they like, so let's use dtrt-indent (dtrt =
do the right thing) to try and figure out the best indentation. I don't enable
it automatically though, I invoke it manually.

;; Use the full Java 1.5 grammar to parse Java files(autoload 'wisent-java-default-setup"semantic/wisent/java""Hook run to setup Semantic in `java-mode'." nil nil)(defuneos/setup-semantic-mode()(interactive)(use-packagesemantic:init(require'semantic/wisent)(require'semantic/wisent/java)(require'semantic/wisent/java-wy)(require'semantic/ia)(setq semantic-default-submodes
'(;; Perform semantic actions during idle time
global-semantic-idle-scheduler-mode
;; Use a database of parsed tags
global-semanticdb-minor-mode
;; Decorate buffers with additional semantic information
global-semantic-decoration-mode
;; Highlight the name of the function you're currently in
global-semantic-highlight-func-mode
;; Generate a summary of the current tag when idle
global-semantic-idle-summary-mode
;; Switch to recently changed tags with `semantic-mrub-switch-tags',;; or `C-x B'
global-semantic-mru-bookmark-mode))(semantic-mode t);; Fixing a bug in semantic, see #22287(defunsemanticdb-save-all-db-idle()"Save all semantic tag databases from idle time.Exit the save between databases if there is user input."(semantic-safe"Auto-DB Save: %S";; FIXME: Use `while-no-input'?(save-mark-and-excursion;; <-- added line(semantic-exit-on-input'semanticdb-idle-save(mapc (lambda(db)(semantic-throw-on-input'semanticdb-idle-save)(semanticdb-save-db db t))
semanticdb-database-list)))))))(add-hook 'c-mode-hook#'eos/setup-semantic-mode)(add-hook 'java-mode-hook#'eos/setup-semantic-mode)(add-hook 'emacs-lisp-mode-hook#'semantic-mode)

Emacs' Built In Electric Modes (pair/indent/layout)

Emacs finally has better support for automatically doing things like indentation
and pairing parentheses. So, let's enable (some) of that

Paren matching with electric-pair-mode and Smartparens

So, I vacillate between using electric-pair-mode and smartparens, ELP
because it's built-in to Emacs and much faster, and Smartparens because it
supports a lot of the paredit-like things that I love in lisp, but everywhere.

First, stuff for automatically inserting pairs of characters with electric-pair-mode: