From c591c68dada8432b74b8c9b2da4688fa453a530e Mon Sep 17 00:00:00 2001 From: Valentin Gehrke Date: Sat, 14 Oct 2017 13:01:05 +0200 Subject: [PATCH] emacs - cleanup --- emacs/.emacs.d/init.el | 81 ++++++------------------------------------ 1 file changed, 11 insertions(+), 70 deletions(-) diff --git a/emacs/.emacs.d/init.el b/emacs/.emacs.d/init.el index 6dd1419..9457536 100644 --- a/emacs/.emacs.d/init.el +++ b/emacs/.emacs.d/init.el @@ -452,15 +452,6 @@ (add-hook 'global-undo-tree-mode-hook (lambda () (linum-mode -1)))) -;; Easy terminal -(setq my/default-shell (or (executable-find "zsh") (executable-find "bash"))) - -;;(use-package shell-pop -;; :ensure t -;; :bind ("C-x t" . shell-pop) -;; :config -;; (setq-default shell-pop-term-shell my/default-shell)) - ;; tabbing (setq-default tab-width 4) (setq-default LateX-indent-level 4) @@ -502,12 +493,6 @@ (global-set-key (kbd "C-x ") 'windmove-left) (global-set-key (kbd "C-x ") 'windmove-right) -; New keys -; (global-set-key (kbd "") 'windmove-up) -; (global-set-key (kbd "") 'windmove-down) -; (global-set-key (kbd "") 'windmove-left) -; (global-set-key (kbd "") 'windmove-right) - ; Whitespace mode toggle (global-set-key (kbd "C-x C-l") 'whitespace-mode) (defalias 'wsm 'whitespace-mode) @@ -517,26 +502,17 @@ (interactive) (select-window (next-window))) -(global-set-key (kbd "") 'cycle-window) - -;; Exit prompt -;; (defun foreach (alist func) -;; (while alist -;; (progn -;; (funcall func (car alist)) -;; (setq alist (cdr alist))))) - -(defun check-for-open-buffers () - (interactive) - (or (dolist - (buffer (buffer-list)) - (cond - ((string-match "^\\*.*\\*$" (buffer-name buffer)) - nil) - ((null (buffer-modified-p buffer)) - nil) - (t - (yes-or-no-p (format "Buffer %s is open. Exit anyway?" (buffer-name buffer)))))))) +;; (defun check-for-open-buffers () +;; (interactive) +;; (or (dolist +;; (buffer (buffer-list)) +;; (cond +;; ((string-match "^\\*.*\\*$" (buffer-name buffer)) +;; nil) +;; ((null (buffer-modified-p buffer)) +;; nil) +;; (t +;; (yes-or-no-p (format "Buffer %s is open. Exit anyway?" (buffer-name buffer)))))))) ;; Latex german (quail-define-package "latex-german" "UTF-8" "LaGe" t @@ -588,11 +564,6 @@ ;; Change all prompts to y or n (fset 'yes-or-no-p 'y-or-n-p) -;; Insert date time, german format -(defun datetime-german () - (interactive) - (insert (format-time-string "%d.%m.%Y %H:%M"))) - ;; Insert time, german format (defun time-german () (interactive) @@ -600,37 +571,7 @@ (global-set-key (kbd "C-c C-d") 'time-german) -(defun fefe () - (interactive) - (eww "https://blog.fefe.de")) - -;; Comment fun - -;(defun extend-comment () -; (interactive) -; (if (looking-back "//" (line-beginning-position)) -; (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))) - ;; Load local emacs settings - (let ((local-config (concat user-emacs-directory "init.local"))) (when (file-exists-p (concat local-config ".el")) (load local-config)))