From 4ff372160ed056df4ea7905dbffff57137782eef Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Thu, 5 Oct 2017 09:31:11 +0200 Subject: [PATCH] untabify --- emacs/.emacs | 116 +++++++++++++++++++++++++-------------------------- 1 file changed, 58 insertions(+), 58 deletions(-) diff --git a/emacs/.emacs b/emacs/.emacs index c403950..f49e582 100644 --- a/emacs/.emacs +++ b/emacs/.emacs @@ -15,10 +15,10 @@ ;; Default frame size (setq initial-frame-alist - '( - (width . 110) - (height . 40) - )) + '( + (width . 110) + (height . 40) + )) ;; Use cperl-mode instead of perl-mode (defalias 'perl-mode 'cperl-mode) @@ -94,10 +94,10 @@ (defun ensure-package-installed (package) "Ensure packages are installed" (if (package-installed-p package) - nil - (progn - (package-refresh-contents) - (package-install package)))) + nil + (progn + (package-refresh-contents) + (package-install package)))) (ensure-package-installed 'use-package) @@ -118,7 +118,7 @@ ;; shackle ;(defun my/shackle-rules () ; (setq shackle-rules -; '((term-mode :select t :align 'below :size 0.2)))) +; '((term-mode :select t :align 'below :size 0.2)))) ; ;(use-package shackle ; :ensure t @@ -168,15 +168,15 @@ :ensure t :demand t :config (progn - (require 'auto-complete-config) - (setq ac-sources '(ac-source-filename - ac-source-functions - ac-source-yasnippet - ac-source-variables - ac-source-symbols - ac-source-features - ac-source-words-in-all-buffer - ac-source-dictionary)) + (require 'auto-complete-config) + (setq ac-sources '(ac-source-filename + ac-source-functions + ac-source-yasnippet + ac-source-variables + ac-source-symbols + ac-source-features + ac-source-words-in-all-buffer + ac-source-dictionary)) (global-auto-complete-mode))) ;; folding @@ -193,10 +193,10 @@ :ensure t :demand t :config (progn - (ivy-mode 1) - (setq ivy-use-virtual-buffers t) - (setq ivy-count-format "(%d/%d) ") - (define-key ivy-minibuffer-map (kbd "") 'ivy-immediate-done))) + (ivy-mode 1) + (setq ivy-use-virtual-buffers t) + (setq ivy-count-format "(%d/%d) ") + (define-key ivy-minibuffer-map (kbd "") 'ivy-immediate-done))) (use-package counsel :ensure t @@ -211,7 +211,7 @@ :ensure t :demand t :config (progn - (global-set-key (kbd "C-x t") #'terminal-here-launch))) + (global-set-key (kbd "C-x t") #'terminal-here-launch))) ;; swiper (use-package swiper @@ -253,7 +253,7 @@ :disabled :bind ("C-s" . avy-goto-word-0) :config (progn - (setq avy-keys '(?a ?s ?d ?f ?g ?q ?w ?e ?r ?t ?y ?x ?c ?v ?z ?u ?i ?o ?p ?h ?j ?k ?l ?b ?n ?m)))) + (setq avy-keys '(?a ?s ?d ?f ?g ?q ?w ?e ?r ?t ?y ?x ?c ?v ?z ?u ?i ?o ?p ?h ?j ?k ?l ?b ?n ?m)))) ;; Magit (use-package magit @@ -285,11 +285,11 @@ ;(defun my/compilation-bury-buffer-without-error (buffer string) ; (cond ((string-match "finished" string) -; (message "Build maybe successful: closing window.") -; (run-with-timer 3 nil -; 'delete-window -; (get-buffer-window buffer t))) -; (t (message "Compilation exited abnormaly: %s" string)))) +; (message "Build maybe successful: closing window.") +; (run-with-timer 3 nil +; 'delete-window +; (get-buffer-window buffer t))) +; (t (message "Compilation exited abnormaly: %s" string)))) ; ;(setq compilation-finish-function 'my/compilation-bury-buffer-without-error) @@ -328,24 +328,24 @@ (global-set-key (kbd "") 'cycle-window) ;; Exit prompt -(defun foreach (alist func) - (while alist - (progn - (funcall func (car alist)) - (setq alist (cdr alist))))) +;; (defun foreach (alist func) +;; (while alist +;; (progn +;; (funcall func (car alist)) +;; (setq alist (cdr alist))))) ;(defun emacs-exit-prompt () ; (foreach ; (buffer-list) ; (lambda (buffer) -; (cond -; ((string-match "^\\*.*\\*$" (buffer-name buffer)) nil) -; ((null (buffer-modified-p buffer)) nil) -; (t nil))))) +; (cond +; ((string-match "^\\*.*\\*$" (buffer-name buffer)) nil) +; ((null (buffer-modified-p buffer)) nil) +; (t nil))))) ;; Latex german (quail-define-package "latex-german" "UTF-8" "LaGe" t - "Transforms umlauts to the better latex notation. + "Transforms umlauts to the better latex notation. ä -> \"a ö -> \"o ü -> \"u @@ -353,7 +353,7 @@ Ö -> \"O Ü -> \"U ß -> \"s" - nil t nil nil nil nil nil nil nil nil t) + nil t nil nil nil nil nil nil nil nil t) (quail-define-rules ("ä" ["\"a"]) ("ö" ["\"o"]) @@ -365,8 +365,8 @@ ) (add-hook 'latex-mode-hook (lambda () - (set-input-method "latex-german") - (local-set-key "\"" 'self-insert-command))) + (set-input-method "latex-german") + (local-set-key "\"" 'self-insert-command))) ;; Treat _ as part of word in some modes (defun treat-underscore () @@ -380,11 +380,11 @@ ;; Overlay windows (What does it do?) (add-to-list 'display-buffer-alist - '("*Apropos*" display-buffer-same-window)) + '("*Apropos*" display-buffer-same-window)) (add-to-list 'display-buffer-alist - '("*Help*" display-buffer-in-side-window)) + '("*Help*" display-buffer-in-side-window)) (add-to-list 'display-buffer-alist - '("*compilation*" (display-buffer-reuse-window display-buffer-in-side-window) (side . bottom) (size . 0.2))) + '("*compilation*" (display-buffer-reuse-window display-buffer-in-side-window) (side . bottom) (size . 0.2))) ;; Change all prompts to y or n (fset 'yes-or-no-p 'y-or-n-p) @@ -401,22 +401,22 @@ ;(defun extend-comment () ; (interactive) ; (if (looking-back "//" (line-beginning-position)) -; (progn -; (newline-and-indent) -; (insert "Hallo Welt")) -; (newline-and-indent))) +; (progn +; (newline-and-indent) +; (insert "Hallo Welt")) +; (newline-and-indent))) ;; Show in binary and decimal ;(defun hex-popup () ; (interactive) ; (let (hexStr p1 p2) -; (save-excursion -; (search-backward-regexp "[^0-9A-Fa-f]" nil t) -; (forward-char) -; (setq p1 (point)) -; (search-forward-regexp "[^0-9A-Fa-f]" nil t) -; (backward-char) -; (setq p2 (point))) -; (setq hexStr (buffer-substring-no-properties p1 p2)) -; (message "The hex number is: '%s' '%d' '%d'" hexStr p1 p2))) +; (save-excursion +; (search-backward-regexp "[^0-9A-Fa-f]" nil t) +; (forward-char) +; (setq p1 (point)) +; (search-forward-regexp "[^0-9A-Fa-f]" nil t) +; (backward-char) +; (setq p2 (point))) +; (setq hexStr (buffer-substring-no-properties p1 p2)) +; (message "The hex number is: '%s' '%d' '%d'" hexStr p1 p2)))