From 36021214b1943d5fecbb734bd27491b79efd938c Mon Sep 17 00:00:00 2001 From: John Doty Date: Mon, 19 Sep 2016 09:47:00 -0700 Subject: [PATCH] Some emacs customizations --- .emacs.d/core.el | 20 ++++++++++++++++++-- .emacs.d/custom.el | 19 ++++++++++++++++++- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/.emacs.d/core.el b/.emacs.d/core.el index d61cad2..5a7dc57 100644 --- a/.emacs.d/core.el +++ b/.emacs.d/core.el @@ -47,6 +47,21 @@ (setq custom-file (concat init-dir "custom.el")) (load custom-file) +;; ================================================================= +;; FB STUFF +;; ================================================================= +(defconst master-dir (getenv "LOCAL_ADMIN_SCRIPTS")) +(defconst engshare-master (getenv "ADMIN_SCRIPTS")) +(if (file-exists-p (expand-file-name "master.emacs" master-dir)) + (load-library (expand-file-name "master.emacs" master-dir)) + (load-library (expand-file-name "master.emacs" engshare-master))) + +(if (string-match-p ".+\.prn1\.facebook\.com" (getenv "HOSTNAME")) + (setq url-proxy-services + '(("no_proxy" . "^\\(localhost\\|10.*\\)") + ("http" . "fwdproxy:8080") + ("https" . "fwdproxy:8080")))) + ;; ================================================================= ;; Common stuff that's needed once ;; ================================================================= @@ -78,6 +93,7 @@ 'ruby-mode ; Major mode for editing Ruby files 'color-theme ; Color themes... 'color-theme-solarized ; ...Solarized + 'color-theme-monokai ; ...Monokai 'csharp-mode ; C# mode 'js2-mode ; Improved JS mode 'lua-mode ; LUA @@ -195,8 +211,8 @@ (if (display-graphic-p) (progn (require 'color-theme) - (require 'color-theme-solarized) - (color-theme-solarized))) + (require 'color-theme-monokai) + (color-theme-monokai))) ;; Modeline format: (display-time-mode -1) diff --git a/.emacs.d/custom.el b/.emacs.d/custom.el index 4d1abfc..21c1ce2 100644 --- a/.emacs.d/custom.el +++ b/.emacs.d/custom.el @@ -31,13 +31,29 @@ '(org-hide-leading-stars t) '(org-odd-levels-only t) '(rmail-mail-new-frame t) - '(safe-local-variable-values (quote ((eval ignore-errors "Write-contents-functions is a buffer-local alternative to before-save-hook" (add-hook (quote write-contents-functions) (lambda nil (delete-trailing-whitespace) nil)) (require (quote whitespace)) "Sometimes the mode needs to be toggled off and on." (whitespace-mode 0) (whitespace-mode 1)) (whitespace-line-column . 80) (whitespace-style face trailing lines-tail) (require-final-newline . t)))) + '(safe-local-variable-values + (quote + ((eval ignore-errors "Write-contents-functions is a buffer-local alternative to before-save-hook" + (add-hook + (quote write-contents-functions) + (lambda nil + (delete-trailing-whitespace) + nil)) + (require + (quote whitespace)) + "Sometimes the mode needs to be toggled off and on." + (whitespace-mode 0) + (whitespace-mode 1)) + (whitespace-line-column . 80) + (whitespace-style face trailing lines-tail) + (require-final-newline . t)))) '(scroll-conservatively 1) '(scroll-step 1) '(sd-user-email "johndoty@microsoft.com") '(sd-verbose nil) '(show-paren-mode t) '(show-paren-style (quote parenthesis)) + '(solarized-termcolors 256) '(tab-width 4) '(tags-revert-without-query t) '(transient-mark-mode t) @@ -45,6 +61,7 @@ '(use-dialog-box nil) '(web-mode-code-indent-offset 2) '(web-mode-css-indent-offset 2) + '(web-mode-enable-sql-detection t) '(which-func-mode-global t nil (which-func)) '(widget-editable-list-gui t) '(x-stretch-cursor nil))