Rearrange noexternals

This commit is contained in:
Iñaki
2017-06-08 14:48:05 +02:00
parent f1e842d052
commit 19e08da5c1

View File

@@ -3,38 +3,55 @@
(when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1)) (when (fboundp 'scroll-bar-mode) (scroll-bar-mode -1))
(when (fboundp 'windmove-default-keybindings) (when (fboundp 'windmove-default-keybindings)
(windmove-default-keybindings)) (windmove-default-keybindings))
(autoload 'ghc-init "ghc" nil t) (autoload 'ghc-init "ghc" nil t)
(autoload 'ghc-debug "ghc" nil t) (autoload 'ghc-debug "ghc" nil t)
(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
(add-to-list 'exec-path "~/.cabal/bin") (add-to-list 'exec-path "~/.cabal/bin")
(add-to-list (add-to-list
'default-frame-alist 'default-frame-alist
'(font . "Iosevka Term 10")) '(font . "Iosevka Term 10"))
(set-frame-font (set-frame-font
"Iosevka Term 10") "Iosevka Term 10")
(setq frame-title-format (setq frame-title-format
'(buffer-file-name "%f" '(buffer-file-name "%f" (dired-directory dired-directory "%b"))
(dired-directory dired-directory "%b"))) ;; (setq debug-on-error t)
(fringe-mode '(0 . 0)) auth-source-save-behavior nil
;; (setq debug-on-error t)
(setq auth-source-save-behavior nil
haskell-process-auto-import-loaded-modules t haskell-process-auto-import-loaded-modules t
haskell-process-log t haskell-process-log t
haskell-process-suggest-remove-import-lines t haskell-process-suggest-remove-import-lines t
haskell-process-type (quote cabal-repl) haskell-process-type (quote cabal-repl)
send-mail-function (quote smtpmail-send-it)) send-mail-function (quote smtpmail-send-it)
(setq enable-local-variables nil) enable-local-variables nil
(setq inhibit-startup-screen t) inhibit-startup-screen t
(setq vc-follow-symlinks t) vc-follow-symlinks t
(setq inhibit-compacting-font-caches 1) inhibit-compacting-font-caches 1
mouse-wheel-scroll-amount '(1 ((shift) . 1)) ;; one line at a time
mouse-wheel-progressive-speed nil ;; don't accelerate scrolling
mouse-wheel-follow-mouse 't ;; scroll window under mouse
scroll-step 1
scroll-conservatively 10000 ;; keyboard scroll one line at a time
backup-by-copying t ; don't clobber symlinks
backup-directory-alist '(("." . "~/.saves")) ; don't litter my fs tree
undo-tree-history-directory-alist '(("." . "~/.undo-tree"))
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t ; use versioned backups
backup-directory-alist `((".*" . ,temporary-file-directory))
auto-save-file-name-transforms `((".*" ,temporary-file-directory t))
undo-tree-auto-save-history t
vc-mode 1)
(global-auto-revert-mode 1) (global-auto-revert-mode 1)
(electric-pair-mode 1) (electric-pair-mode 1)
(show-paren-mode t) (show-paren-mode t)
(setq mouse-wheel-scroll-amount '(1 ((shift) . 1))) ;; one line at a time (fringe-mode '(0 . 0))
(setq mouse-wheel-progressive-speed nil) ;; don't accelerate scrolling (global-hl-line-mode 1)
(setq mouse-wheel-follow-mouse 't) ;; scroll window under mouse (blink-cursor-mode 0)
(setq scroll-step 1 (display-time-mode 1)
scroll-conservatively 10000) ;; keyboard scroll one line at a time
(add-to-list 'auto-mode-alist '("\\.h\\'" . c-mode)) (add-to-list 'auto-mode-alist '("\\.h\\'" . c-mode))
(add-to-list 'auto-mode-alist '("\\.zsh\\'" . sh-mode)) (add-to-list 'auto-mode-alist '("\\.zsh\\'" . sh-mode))
(add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.phtml\\'" . web-mode))
@@ -47,12 +64,12 @@
(add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode)) (add-to-list 'auto-mode-alist '("\\.html?\\'" . web-mode))
(add-to-list 'auto-mode-alist (add-to-list 'auto-mode-alist
'("\\.\\(p\\(?:k[bg]\\|ls\\)\\|sql\\)\\'" . plsql-mode)) '("\\.\\(p\\(?:k[bg]\\|ls\\)\\|sql\\)\\'" . plsql-mode))
(defun my-web-mode-hook () (defun my-web-mode-hook ()
"Hooks for Web mode." "Hooks for Web mode."
(setq web-mode-markup-indent-offset 2) (setq web-mode-markup-indent-offset 2
(setq web-mode-code-indent-offset 2) web-mode-code-indent-offset 2
(setq web-mode-css-indent-offset 2)) web-mode-css-indent-offset 2))
(add-hook 'web-mode-hook 'my-web-mode-hook)
(setq-default indent-tabs-mode t) (setq-default indent-tabs-mode t)
(setq-default tab-width 8) (setq-default tab-width 8)
@@ -67,21 +84,19 @@
(add-hook 'c-mode-common-hook (add-hook 'c-mode-common-hook
(lambda () (lambda ()
(c-add-style (c-add-style "libvirt"
"libvirt" '((indent-tabs-mode . nil)
'((indent-tabs-mode . nil) (c-basic-offset . 4)
(c-basic-offset . 4) (c-indent-level . 4)
(c-indent-level . 4) (c-offsets-alist
(c-offsets-alist (label . 1))))
(label . 1))))
;; Add kernel style ;; Add kernel style
(c-add-style (c-add-style "linux-tabs-only"
"linux-tabs-only" '("linux"
'("linux" (c-offsets-alist
(c-offsets-alist (arglist-cont-nonempty
(arglist-cont-nonempty c-lineup-gcc-asm-reg
c-lineup-gcc-asm-reg c-lineup-arglist-tabs-only))))))
c-lineup-arglist-tabs-only))))))
(defun my-c-mode-hooks () (defun my-c-mode-hooks ()
(let ((bname (buffer-file-name))) (let ((bname (buffer-file-name)))
@@ -91,28 +106,6 @@
((string-match "linux/" bname) (c-set-style "linux-tabs-only")) ((string-match "linux/" bname) (c-set-style "linux-tabs-only"))
))) )))
(add-hook 'c-mode-hook 'my-c-mode-hooks)
(setq backup-by-copying t ; don't clobber symlinks
backup-directory-alist
'(("." . "~/.saves")) ; don't litter my fs tree
undo-tree-history-directory-alist
'(("." . "~/.undo-tree"))
delete-old-versions t
kept-new-versions 6
kept-old-versions 2
version-control t) ; use versioned backups
(setq backup-directory-alist
`((".*" . ,temporary-file-directory)))
(setq auto-save-file-name-transforms
`((".*" ,temporary-file-directory t)))
(setq undo-tree-auto-save-history t)
(global-hl-line-mode 1)
(blink-cursor-mode 0)
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(setq vc-mode 1)
(display-time-mode 1)
(defun remove-elc-on-save () (defun remove-elc-on-save ()
"If you're saving an elisp file, likely the .elc is no longer valid." "If you're saving an elisp file, likely the .elc is no longer valid."
(add-hook 'after-save-hook (add-hook 'after-save-hook
@@ -123,6 +116,10 @@
t)) t))
(add-hook 'emacs-lisp-mode-hook 'remove-elc-on-save) (add-hook 'emacs-lisp-mode-hook 'remove-elc-on-save)
(add-hook 'c-mode-hook 'my-c-mode-hooks)
(add-hook 'web-mode-hook 'my-web-mode-hook)
(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
(add-hook 'before-save-hook 'delete-trailing-whitespace)
(add-hook 'eshell-mode-hook (lambda () (add-hook 'eshell-mode-hook (lambda ()
(setq-local global-hl-line-mode nil))) (setq-local global-hl-line-mode nil)))