Tweaks
Summary: Test Plan: Reviewers: Subscribers: Tasks: Tags:
This commit is contained in:
parent
e0b6e8a17f
commit
3c52e5c3c1
2 changed files with 16 additions and 23 deletions
|
|
@ -62,7 +62,8 @@
|
||||||
(defconst engshare-master (getenv "ADMIN_SCRIPTS"))
|
(defconst engshare-master (getenv "ADMIN_SCRIPTS"))
|
||||||
(defconst is-fb-environment
|
(defconst is-fb-environment
|
||||||
(or (file-exists-p (expand-file-name "master.emacs" master-dir))
|
(or (file-exists-p (expand-file-name "master.emacs" master-dir))
|
||||||
(file-exists-p (expand-file-name "master.emacs" engshare-master))))
|
(file-exists-p (expand-file-name "master.emacs" engshare-master)))
|
||||||
|
"Are we running on an FB machine or not?")
|
||||||
|
|
||||||
(when is-fb-environment
|
(when is-fb-environment
|
||||||
;; Load the master.emacs file which apparently has stuff in it I want?
|
;; Load the master.emacs file which apparently has stuff in it I want?
|
||||||
|
|
@ -74,7 +75,7 @@
|
||||||
;; Set up the proxy for working properly from the devserver.
|
;; Set up the proxy for working properly from the devserver.
|
||||||
(if (and
|
(if (and
|
||||||
(getenv "HOSTNAME")
|
(getenv "HOSTNAME")
|
||||||
(string-match-p ".+\.prn1\.facebook\.com" (getenv "HOSTNAME")))
|
(string-match-p ".+\.facebook\.com" (getenv "HOSTNAME")))
|
||||||
(setq url-proxy-services
|
(setq url-proxy-services
|
||||||
'(("no_proxy" . "^\\(localhost\\|10.*\\)")
|
'(("no_proxy" . "^\\(localhost\\|10.*\\)")
|
||||||
("http" . "fwdproxy:8080")
|
("http" . "fwdproxy:8080")
|
||||||
|
|
@ -296,10 +297,12 @@
|
||||||
(indent-region m1 m2 nil)))
|
(indent-region m1 m2 nil)))
|
||||||
|
|
||||||
(defun my-c-common-hook ()
|
(defun my-c-common-hook ()
|
||||||
|
"My common hook for C/C++/&c."
|
||||||
(turn-on-auto-fill)
|
(turn-on-auto-fill)
|
||||||
(flyspell-prog-mode)
|
(flyspell-prog-mode)
|
||||||
(define-key c-mode-base-map "\C-m" 'c-context-line-break)
|
(define-key c-mode-base-map "\C-m" 'c-context-line-break)
|
||||||
(set-fill-column 120)
|
(unless is-fb-environment
|
||||||
|
(set-fill-column 120))
|
||||||
(local-set-key "}" 'indent-on-closing-bracket))
|
(local-set-key "}" 'indent-on-closing-bracket))
|
||||||
|
|
||||||
(add-hook 'c-mode-common-hook 'my-c-common-hook)
|
(add-hook 'c-mode-common-hook 'my-c-common-hook)
|
||||||
|
|
@ -355,27 +358,16 @@
|
||||||
(statement-case-open . +)
|
(statement-case-open . +)
|
||||||
))))
|
))))
|
||||||
|
|
||||||
(c-add-style "fb-c"
|
(defun clang-format-cpp-buffer ()
|
||||||
'("gnu"
|
"Format a buffer with clang-format but only if it's C or C++."
|
||||||
(c-basic-offset . 2)
|
(when (or (eq major-mode 'c++-mode)
|
||||||
(c-offsets-alist . ((c . c-lineup-C-comments)
|
(eq major-mode 'c-mode))
|
||||||
(inclass . +)
|
(clang-format-buffer)))
|
||||||
(access-label . -)
|
|
||||||
(defun-block-intro . +)
|
|
||||||
(substatement-open . 0)
|
|
||||||
(statement-block-intro . +)
|
|
||||||
(innamespace . +)
|
|
||||||
(statement-case-intro . +)
|
|
||||||
(statement-case-open . 0)
|
|
||||||
(brace-list-intro . +)
|
|
||||||
(substatement . +)
|
|
||||||
(arglist-intro . +)
|
|
||||||
(arglist-close . 0)
|
|
||||||
(statement-case-open . +)
|
|
||||||
))))
|
|
||||||
|
|
||||||
(defun my-c-mode-hook ()
|
(defun my-c-mode-hook ()
|
||||||
(c-set-style (if is-fb-environment "fb-c" "ms-c")))
|
"Doty's `c-mode' hook."
|
||||||
|
(c-set-style (if is-fb-environment "fb-c-style" "ms-c"))
|
||||||
|
(add-hook 'before-save-hook 'clang-format-cpp-buffer))
|
||||||
|
|
||||||
(add-hook 'c-mode-hook 'my-c-mode-hook)
|
(add-hook 'c-mode-hook 'my-c-mode-hook)
|
||||||
(add-hook 'c++-mode-hook 'my-c-mode-hook)
|
(add-hook 'c++-mode-hook 'my-c-mode-hook)
|
||||||
|
|
|
||||||
|
|
@ -24,6 +24,7 @@
|
||||||
'(fast-lock-minimum-size nil)
|
'(fast-lock-minimum-size nil)
|
||||||
'(fill-column 77)
|
'(fill-column 77)
|
||||||
'(find-file-run-dired t)
|
'(find-file-run-dired t)
|
||||||
|
'(flycheck-gcc-language-standard "c++11")
|
||||||
'(font-lock-global-modes t)
|
'(font-lock-global-modes t)
|
||||||
'(font-lock-maximum-size nil)
|
'(font-lock-maximum-size nil)
|
||||||
'(font-lock-support-mode (quote jit-lock-mode))
|
'(font-lock-support-mode (quote jit-lock-mode))
|
||||||
|
|
@ -49,7 +50,7 @@
|
||||||
((sequence "TODO" "|" "DONE" "ABANDONED" "DEFERRED"))))
|
((sequence "TODO" "|" "DONE" "ABANDONED" "DEFERRED"))))
|
||||||
'(package-selected-packages
|
'(package-selected-packages
|
||||||
(quote
|
(quote
|
||||||
(mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company omnisharp geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode zencoding-mode tss switch-window python-mode paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell csharp-mode color-theme-solarized color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode company-jedi tide ahg elm-mode monky)))
|
(mustache-mode clang-format projectile dash-functional mocha add-node-modules-path rjsx-mode xref-js2 js2-refactor company omnisharp geiser cider clojure-mode graphviz-dot-mode multi-term xterm-color thrift markdown-mode tuareg merlin ag use-package flycheck dockerfile-mode js2-mode web-mode zencoding-mode tss switch-window python-mode paredit magit lua-mode go-mode go-autocomplete exec-path-from-shell csharp-mode color-theme-solarized color-theme-monokai auto-complete auto-complete-nxml flymake flyspell json-mode popup ruby-mode company-jedi tide ahg elm-mode monky)))
|
||||||
'(reb-re-syntax (quote string))
|
'(reb-re-syntax (quote string))
|
||||||
'(rmail-mail-new-frame t)
|
'(rmail-mail-new-frame t)
|
||||||
'(safe-local-variable-values
|
'(safe-local-variable-values
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue