;;; package - Flycheck should complain about this row! (setq inhibit-startup-message t) (show-paren-mode 1) (cua-mode t) ;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ;;; init-use-package.el --- Get started with use-package in emacs! ;; http://cachestocaches.com/2015/8/getting-started-use-package/ ;http://github.com/CachesToCaches/getting_started_with_use_package/blob/master/init-use-package.el ;; Copyright (C) 2015 Gregory J Stein ;; Author: Gregory J Stein ; Henrik Alfken ;; Code inspired by: http://stackoverflow.com/a/10093312/3672986 ;; http://swsnr.de/blog/2015/01/06/my-emacs-configuration-with-use-package/ ;; http://github.com/jwiegley/use-package ;;; Commentary: ;; As Sebastian Wiesner from http://www.lunaryorn.com/ points out, there is a "chicken and egg" ;; problem with use-package, which is capable of automatically downloading and installing ;; packages, but otherwise needs to be downloaded and installed manually. I include the ;; following code in my Emacs initialization file so that this process is automatic. ;;; Code: ;; Update package-archive lists: (require 'package) (setq package-enable-at-startup nil) (add-to-list 'package-archives '("gnu" . "http://elpa.gnu.org/packages/")) (add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/")) (package-initialize) ;(package-refresh-contents) ; !Uncomment this line if use-package gives an Error: "Not Found" ;; http://stackoverflow.com/questions/24833964/package-listed-in-melpa-but-not-found-in-package-install#29017473 (unless (package-installed-p 'use-package) (package-refresh-contents) (package-install 'use-package)) ; <<^^ Install 'use-package' if necessary. (eval-when-compile (require 'use-package)) ;(require 'diminish) ; << Maybe uncomment. (require 'bind-key) ; << If you use any :bind variant. ;;; init-use-package.el ends here ;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (setq default-frame-alist '((left . -0) (width . 127) (fullscreen . fullheight))) ;; (require 'flycheck) (use-package crux :ensure t) (use-package flycheck :ensure t :init (global-flycheck-mode)) ;http://github.com/flycheck/flycheck/blob/master/doc/user/installation.rst#user-content-use-package ;C-examples: https://github.com/flymake/c-flymake-hello-world (add-hook 'c-mode-hook 'flycheck-mode-on) ;; - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - (setq custom-file "~/.emacs.d/custom.el") (load custom-file 'noerror) ; ^^ http://emacsblog.org/2008/12/06/quick-tip-detaching-the-custom-file/ (add-hook 'before-save-hook 'do-before-save) (defun do-before-save()(delete-trailing-whitespace)(write-region "" nil "~/.emacs.d/custom.el")) ; http://stackoverflow.com/questions/40179200/how-to-use-function-write-region#40179637 ;;; package - Flycheck should complain about missing ";;; init.el ends here".