diff options
Diffstat (limited to '.config/emacs')
-rw-r--r-- | .config/emacs/custom.el | 24 | ||||
-rw-r--r-- | .config/emacs/init.el | 183 | ||||
-rw-r--r-- | .config/emacs/wl.el | 16 |
3 files changed, 98 insertions, 125 deletions
diff --git a/.config/emacs/custom.el b/.config/emacs/custom.el index 8e72fec..04c1bec 100644 --- a/.config/emacs/custom.el +++ b/.config/emacs/custom.el @@ -33,14 +33,27 @@ (quote ("xelatex -interaction nonstopmode -output-directory %o %f" "xelatex -interaction nonstopmode -output-directory %o %f" "xelatex -interaction nonstopmode -output-directory %o %f"))) '(org-src-fontify-natively t) - '(package-selected-packages - (quote - (yaml-mode smart-tabs-mode scss-mode sass-mode page-break-lines nginx-mode mediawiki markdown-mode jabber graphviz-dot-mode gradle-mode go-mode glsl-mode editorconfig dtrt-indent coffee-mode cmake-mode bison-mode))) '(ruby-deep-arglist nil) '(ruby-deep-indent-paren nil) '(safe-local-variable-values (quote - ((Nginx-indent-tabs-mode) + ((Fill-Column . 64) + (eval c-set-offset + (quote arglist-close) + 0) + (eval c-set-offset + (quote arglist-intro) + (quote ++)) + (eval c-set-offset + (quote case-label) + 0) + (eval c-set-offset + (quote statement-case-open) + 0) + (eval c-set-offset + (quote substatement-open) + 0) + (Nginx-indent-tabs-mode) (Nginx-indent-level . 4) (Nginx-indent-level . 8) (c-set-style . "K&R")))) @@ -49,7 +62,8 @@ '(smtpmail-smtp-server "plus.smtp.mail.yahoo.com") '(smtpmail-smtp-service 587) '(tramp-use-ssh-controlmaster-options nil) - '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify))) + '(uniquify-buffer-name-style (quote post-forward-angle-brackets) nil (uniquify)) + '(use-package-verbose (quote debug))) (custom-set-faces ;; custom-set-faces was added by Custom. ;; If you edit it by hand, you could mess it up, so be careful. diff --git a/.config/emacs/init.el b/.config/emacs/init.el index 88cf870..200daad 100644 --- a/.config/emacs/init.el +++ b/.config/emacs/init.el @@ -5,9 +5,8 @@ (let ((xdg-cache-home (file-name-as-directory (or (getenv "XDG_CACHE_HOME") "~/.cache"))) (xdg-data-home (file-name-as-directory (or (getenv "XDG_DATA_HOME") "~/.local/share")))) (setq - custom-file (concat user-emacs-directory "custom.el") wl-init-file (concat user-emacs-directory "wl.el") - eshell-directory-name (concat xdg-data-home "emacs/eshell/") ;; actually should be split betweenc config and data + eshell-directory-name (concat xdg-data-home "emacs/eshell/") ;; actually should be split between config and data ido-save-directory-list-file (concat xdg-data-home "emacs/ido.last.el") package-user-dir (concat xdg-cache-home "emacs/elpa") @@ -19,6 +18,9 @@ tramp-persistency-file-name (concat xdg-cache-home "emacs/tramp-cache.el") )) +(setq custom-file (concat user-emacs-directory "custom.el")) +(load custom-file 'noerror) + ;;;; The basics that I can't use Emacs without ;;;;;;;;;;;;;;;;;;;;;;; (show-paren-mode 1) (column-number-mode 1) @@ -38,7 +40,6 @@ point-entered minibuffer-avoid-prompt face minibuffer-prompt )) -(load custom-file 'noerror) ;;;; Early settings ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -47,112 +48,81 @@ (set-face-attribute 'default nil :height 80) -;;;; Bootstrap el-get ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; This downloads and installs el-get (package management) if isn't -;; installed. - -;; Derived from ELPA installation -;; http://tromey.com/elpa/install.html -(defun eval-url (url) - (let ((buffer (url-retrieve-synchronously url))) - (save-excursion - (set-buffer buffer) - (goto-char (point-min)) - (re-search-forward "^$" nil 'move) - (eval-region (point) (point-max)) - (kill-buffer (current-buffer))))) - -(add-to-list 'load-path (concat el-get-dir "el-get")) -(unless (require 'el-get nil t) - (let ((el-get-install-branch "master")) ;; live life on the edge - (eval-url "https://github.com/dimitri/el-get/raw/master/el-get-install.el"))) +;;;; Package management ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;;;; Install packages ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; This is kinda funny how it works. -;; -;; package.el/ELPA (The standard package manager in Emacs 24) has -;; terrible programatic management. It's great at installing packages, -;; but only interactively. So, I -;; 1) Disable package.el from getting loading all downloaded packages -;; 2) Use el-get to load a specified list of packages from elpa. -;; -;; This is also nice because I can do event-based programming for what -;; to do once a package is loaded, using :after. - -;; For some reason, el-get adds a bunch of 3rd-party repos to -;; package-archives. I guess I'm ok with that? I don't have to -;; manage them. +;; package.el +(require 'package) +(add-to-list 'package-archives '("melpa" . "http://melpa.org/packages/")) (setq package-enable-at-startup nil) - -;; What packages el-get should get from ELPA (if it gets them at all) -(setq el-get-sources '( - ;; Minor modes - (:name dtrt-indent :type elpa ;; Detect indent style for existing files - :after (dtrt-indent-mode 1)) - (:name page-break-lines :type elpa ;; Display form-feeds pretty - :before (advice-add 'page-break-lines-mode-maybe - :override #'page-break-lines-mode) - :after (global-page-break-lines-mode 1)) - (:name smart-tabs-mode :type elpa ;; Indent with tabs, align with spaces - :after (progn - (smart-tabs-mode 1) - (apply 'smart-tabs-insinuate - (mapcar 'car smart-tabs-insinuate-alist)))) - ;; Major modes - (:name bison-mode :type elpa) - (:name cmake-mode :type elpa) - (:name coffee-mode :type elpa - :after (add-hook 'coffee-mode-hook +(package-initialize) +;; use-package.el +(setq use-package-always-ensure t) +(add-to-list 'load-path (concat user-emacs-directory "use-package")) +(require 'use-package) +(require 'bind-key) + +;; Minor modes +(use-package dtrt-indent ;; Detect indent style for existing files + :config (dtrt-indent-mode 1)) +(use-package page-break-lines ;; Display form-feeds pretty + :init (advice-add 'page-break-lines-mode-maybe + :override #'page-break-lines-mode) + :config (global-page-break-lines-mode 1)) +(use-package smart-tabs-mode ;; Indent with tabs, align with spaces + :config (progn + (smart-tabs-mode 1) + (apply 'smart-tabs-insinuate + (mapcar 'car smart-tabs-insinuate-alist)))) +(use-package editorconfig) +;; Major modes +(use-package bison-mode + :mode (("\\.l\\'" . bison-mode) + ("\\.y\\'" . bison-mode) + ("\\.jison\\'" . jison-mode))) +(use-package coffee-mode + :mode ("\\.coffee\\'" + "\\.iced\\'" + "\\Cakefile\\'" + "\\.cson\\'") + :interpreter "coffee" + :config (add-hook 'coffee-mode-hook '(lambda () (set (make-local-variable 'tab-width) 2) (set (make-local-variable 'indent-tabs-mode) nil) ))) - (:name glsl-mode :type elpa) - (:name go-mode :type elpa) - (:name gradle-mode :type elpa) - (:name graphviz-dot-mode :type elpa) - (:name haml-mode :type elpa) - (:name markdown-mode :type elpa - :after (add-to-list 'auto-mode-alist '("\\.ronn\\'" . markdown-mode))) - (:name mediawiki :type elpa) - (:name nginx-mode :type elpa - :after (put 'nginx-indent-level 'safe-local-variable 'integerp)) - (:name scss-mode :type elpa) - (:name yaml-mode :type elpa) - (:name editorconfig :type elpa) - )) -;; What packages el-get should install, both from above, and its -;; internal list of sources. -(el-get 'sync (append - '(el-get) - ;; Minor modes - '(dtrt-indent - page-break-lines - smart-tabs-mode - editorconfig - ) - ;; Major modes - (if (file-exists-p "~/Maildir") ; wanderlust is huge, only use on emailing boxes - '(apel flim semi wanderlust) - '()) - '( - ;;nxhtml ; nxhtml is invasive, only enable if actively using - bison-mode - cmake-mode - coffee-mode - glsl-mode - go-mode - gradle-mode - graphviz-dot-mode - haml-mode - markdown-mode - mediawiki - nginx-mode - php-mode-improved - scss-mode - yaml-mode - ))) +;;(use-package php-mode-improved +;; :mode (("\\.php[s34]?\\'" . php-mode) +;; ("\\.phtml\\'" . php-mode) +;; ("\\.inc\\'" . php-mode)) +;; :config (add-hook 'php-mode-hook +;; '(lambda () +;; (c-set-offset 'cpp-macro 0) +;; ))) +(use-package cmake-mode :mode ("CMakeLists\\.txt\\'" "\\.cmake\\'")) +(use-package glsl-mode :mode ("\\.vert\\'" "\\.frag\\'" "\\.geom\\'" "\\.glsl\\'")) +(use-package go-mode :mode "\\.go\\'") +(use-package graphviz-dot-mode :mode ("\\.dot\\'" "\\.gv\\'")) +(use-package haml-mode :mode "\\.haml\\'") +(use-package less-css-mode :mode "\\.less\\'") +(use-package markdown-mode :mode ("\\.markdown\\'" "\\.md\\'" "\\.ronn\\'")) +(use-package nginx-mode :mode ("nginx\\.conf\\'" "/nginx/.+\\.conf\\'")) +(use-package php-mode :mode ("\\.php[s345t]?\\'" "/\\.php_cs\\(\\.dist\\)?\\'" "\\.phtml\\'" "/Amkfile\\'" "\\.amk\\'")) +(use-package scss-mode :mode "\\.scss\\'") +(use-package yaml-mode :mode "\\.e?ya?ml\\'") + +;;(use-package nxhtml) ; nxhtml is invasive, only enable if actively using + +(if (file-exists-p "~/Maildir") + ;;'(apel flim semi wanderlust) + (use-package wanderlust + :config (progn + (define-mail-user-agent + 'wl-user-agent + 'wl-user-agent-compose + 'wl-draft-send + 'wl-draft-kill + 'mail-send-hook) + (setq mail-user-agent 'wl-user-agent)))) ;; Misc. crap @@ -325,11 +295,6 @@ sh-script.el is broken." (set (make-local-variable 'tab-width) 4) )) -(add-hook 'php-mode-hook - '(lambda () - (c-set-offset 'cpp-macro 0) - )) - (add-hook 'tex-mode-hook '(lambda () (set (make-local-variable 'tab-always-indent) nil) @@ -343,5 +308,7 @@ sh-script.el is broken." (add-to-list 'auto-mode-alist '("PKGBUILD" . sh-mode)) (add-to-list 'auto-mode-alist '("SRCBUILD" . sh-mode)) +(add-to-list 'auto-mode-alist '("\\.mak\\'" . makefile-gmake-mode)) (add-to-list 'auto-mode-alist '("\\.jad\\'" . java-mode)) + (put 'downcase-region 'disabled nil) diff --git a/.config/emacs/wl.el b/.config/emacs/wl.el index e9e61bd..c27c87e 100644 --- a/.config/emacs/wl.el +++ b/.config/emacs/wl.el @@ -1,24 +1,17 @@ ;; mode:-*-emacs-lisp-*- -(setq user-mail-address "lukeshu@sbcglobal.net") +(setq user-mail-address "lukeshu@lukeshu.com") ;; wanderlust (setq ;; Misc ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - wl-local-domain "lukeshu.ath.cx" + wl-local-domain "lan.lukeshu.com" wl-icon-directory "~/.emacs.d/el-get/wanderlust/icons" + wl-message-id-domain user-mail-address ;; Network ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This only deals with sending--I use offlineimap to fetch - wl-draft-send-mail-function 'wl-draft-send-mail-with-smtp - ;; The following settings are Yahoo!'s SMTP servers: - wl-smtp-connection-type (quote ssl) - wl-smtp-authenticate-type "login" - wl-smtp-posting-server "plus.smtp.mail.yahoo.com" - ;wl-smtp-posting-server "outbound.att.net" - wl-smtp-posting-port 465 - wl-smtp-posting-user user-mail-address - wl-message-id-domain user-mail-address + wl-draft-send-mail-function 'wl-draft-send-mail-with-sendmail ;; Folders/File system ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; elmo-maildir-folder-path "~/Maildir" ;; where I store my mail @@ -45,7 +38,6 @@ ;; Writing wl-from (concat user-full-name " <" user-mail-address ">") ;; From: line - ;;wl-organization "Foo Corp" wl-fcc-force-as-read t ;; mark sent messages as read mime-edit-split-message nil ;; don't split long messages |