<commit_before>;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; general settings ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;

(setq-default indent-tabs-mode nil)

;;;;;;;;;;;;;;;;;;
;;;; packages ;;;;
;;;;;;;;;;;;;;;;;;

(require 'package)
(add-to-list 'package-archives 
    '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives 
    '("MELPA" . "http://melpa.milkbox.net/packages/"))
(package-initialize)

;;; packages I use:
;; (setq my-packages
;;       '(ac-geiser
;;         auto-complete
;;         popup
;;         geiser
;;         ac-slime
;;         auto-complete
;;         popup
;;         auctex
;;         auto-complete-auctex
;;         auto-complete
;;         popup
;;         yasnippet
;;         chicken-scheme
;;         color-theme-solarized
;;         color-theme
;;         elpy
;;         yasnippet
;;         pyvenv
;;         idomenu
;;         highlight-indentation
;;         find-file-in-project
;;         company
;;         find-file-in-project
;;         geiser
;;         gnuplot
;;         graphviz-dot-mode
;;         haskell-mode
;;         highlight-indentation
;;         idomenu
;;         js2-mode
;;         markdown-mode
;;         marmalade-demo
;;         nodejs-repl
;;         org
;;         paredit
;;         popup
;;         prolog
;;         pyvenv
;;         slime
;;         yaml-mode
;;         yasnippet))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; general editing tools ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; autocomplete
;;;;;;;;;;;;;;;;

;(require 'auto-complete)
;;(global-auto-complete-mode t)
;;(auto-complete-mode t)

;;; paredit
;;;;;;;;;;;

(autoload 'my-enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)

(defvar electrify-return-match
  "[\]}\)]"
  "If this regexp matches the text after the cursor, do an \"electric\" return.")

(defun electrify-return-if-match (arg)
  "If the text after the cursor matches `electrify-return-match' then
  open and indent an empty line between the cursor and the text.  Move the
  cursor to the new line."
  (interactive "P")
  (let ((case-fold-search nil))
    (if (looking-at electrify-return-match)
	(save-excursion (newline-and-indent)))
    (newline arg)
    (indent-according-to-mode)))

(defun my-enable-paredit-mode ()
  (paredit-mode t)
  ;;(local-set-key (kbd "<M-right>") 'paredit-forward-slurp-sexp)
  ;;(local-set-key (kbd "<M-left>") 'paredit-forward-barf-sexp)
  ;;(local-set-key (kbd "<C-right>") 'right-word)
  ;;(local-set-key (kbd "<C-left>") 'left-word)
  ;;(local-set-key (kbd "RET") 'electrify-return-if-match)
  (setq paredit-commands
	(remove-duplicates
	 (append 
	  '((("C-)" "M-<right>")
	     paredit-forward-slurp-sexp
	     ("(foo (bar |baz) quux zot)"
	      "(foo (bar |baz quux) zot)")
	     ("(a b ((c| d)) e f)"
	      "(a b ((c| d) e) f)"))
	    (("C-}" "M-<left>")
	     paredit-forward-barf-sexp
	     ("(foo (bar |baz quux) zot)"
	      "(foo (bar |baz) quux zot)"))
	    (("C-<right>")
	     right-word)
	    (("C-<left>")
	     left-word)
	    (("RET")
	     electrify-return-if-match ())))
	 :test 'equal))
  (paredit-define-keys)
  (paredit-annotate-mode-with-examples)
  (paredit-annotate-functions-with-examples)
  (show-paren-mode t))

(add-hook 'emacs-lisp-mode-hook       #'my-enable-paredit-mode)
;;(add-hook 'eval-expression-minibuffer-setup-hook #'my-enable-paredit-mode)
(add-hook 'ielm-mode-hook             #'my-enable-paredit-mode)
(add-hook 'lisp-mode-hook             #'my-enable-paredit-mode)
(add-hook 'lisp-interaction-mode-hook #'my-enable-paredit-mode)
(add-hook 'scheme-mode-hook           #'my-enable-paredit-mode)
(add-hook 'extempore-mode-hook        #'my-enable-paredit-mode)

;;;;;;;;;;;;;;;;;;;
;;;; extempore ;;;;
;;;;;;;;;;;;;;;;;;;

(autoload 'extempore-mode "~/dateien/src/extempore/extras/extempore.el" "" t)
(add-to-list 'auto-mode-alist '("\\.xtm$" . extempore-mode))
(setq user-extempore-directory "~/dateien/src/extempore/")
(setq extempore-program-args "--term nocolor")

;;;;;;;;;;;;;;
;;;; lisp ;;;;
;;;;;;;;;;;;;;

;;; slime
;;;;;;;;;

(load (expand-file-name "~/lisp/quicklisp/slime-helper.el"))
;; Replace "sbcl" with the path to your implementation
(setq inferior-lisp-program "sbcl")
;;(slime-setup '(slime-company))

;;; ac-slime
;;;;;;;;;;;;

(require 'ac-slime)
(defun my-set-up-slime-ac ()
  ;; enable fuzzy completion (t)
  (set-up-slime-ac t)
  ;;(set-up-slime-ac)
  (delete 'ac-source-words-in-same-mode-buffers ac-sources))

;;(add-hook 'slime-mode-hook 'set-up-slime-ac)
;;(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
(add-hook 'slime-mode-hook 'my-set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'my-set-up-slime-ac)
(eval-after-load "auto-complete"
  '(add-to-list 'ac-modes 'slime-repl-mode))

;;;;;;;;;;;;;;;;;;;;;;;;
;;;; chicken scheme ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;

(add-to-list 'load-path "/usr/lib/chicken/7/")
(autoload 'chicken-slime "chicken-slime" "SWANK backend for Chicken" t)

(add-hook 'scheme-mode-hook
          (lambda ()
            (slime-mode t)
            ;; disable fuzzy completion here
            (delete 'ac-source-slime-fuzzy ac-sources)))

;;;;;;;;;;;;;;
;;;; node ;;;;
;;;;;;;;;;;;;;

;;(require 'nodejs-repl)

;;;;;;;;;;;;;;;;
;;;; python ;;;;
;;;;;;;;;;;;;;;;

;;(elpy-enable)

;;;;;;;;;;;;;;;;;;;
;;;; variables ;;;;
;;;;;;;;;;;;;;;;;;;

(custom-set-variables
 ;; custom-set-variables was added by Custom.<commit_msg>less requires in .emacs, ac-auctex<commit_after>;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; general settings ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;

(setq-default indent-tabs-mode nil)

;;;;;;;;;;;;;;;;;;
;;;; packages ;;;;
;;;;;;;;;;;;;;;;;;

(require 'package)

(add-to-list 'package-archives 
    '("marmalade" . "http://marmalade-repo.org/packages/"))
(add-to-list 'package-archives 
    '("MELPA" . "http://melpa.milkbox.net/packages/"))
;; for elpy
(add-to-list 'package-archives
             '("elpy" . "http://jorgenschaefer.github.io/packages/"))

(package-initialize)

;;; packages I use:
;; (setq my-packages
;;       '(ac-geiser
;;         auto-complete
;;         popup
;;         geiser
;;         ac-slime
;;         auto-complete
;;         popup
;;         auctex
;;         auto-complete-auctex
;;         auto-complete
;;         popup
;;         yasnippet
;;         chicken-scheme
;;         color-theme-solarized
;;         color-theme
;;         elpy
;;         yasnippet
;;         pyvenv
;;         idomenu
;;         highlight-indentation
;;         find-file-in-project
;;         company
;;         find-file-in-project
;;         geiser
;;         gnuplot
;;         graphviz-dot-mode
;;         haskell-mode
;;         highlight-indentation
;;         idomenu
;;         js2-mode
;;         markdown-mode
;;         marmalade-demo
;;         nodejs-repl
;;         org
;;         paredit
;;         popup
;;         prolog
;;         pyvenv
;;         slime
;;         yaml-mode
;;         yasnippet))

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;; general editing tools ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

;;; autocomplete
;;;;;;;;;;;;;;;;

(require 'auto-complete)
;;(global-auto-complete-mode t)
;;(auto-complete-mode t)

;;; paredit
;;;;;;;;;;;

(autoload 'my-enable-paredit-mode "paredit" "Turn on pseudo-structural editing of Lisp code." t)

(defvar electrify-return-match
  "[\]}\)]"
  "If this regexp matches the text after the cursor, do an \"electric\" return.")

(defun electrify-return-if-match (arg)
  "If the text after the cursor matches `electrify-return-match' then
  open and indent an empty line between the cursor and the text.  Move the
  cursor to the new line."
  (interactive "P")
  (let ((case-fold-search nil))
    (if (looking-at electrify-return-match)
	(save-excursion (newline-and-indent)))
    (newline arg)
    (indent-according-to-mode)))

(defun my-enable-paredit-mode ()
  (paredit-mode t)
  ;;(local-set-key (kbd "<M-right>") 'paredit-forward-slurp-sexp)
  ;;(local-set-key (kbd "<M-left>") 'paredit-forward-barf-sexp)
  ;;(local-set-key (kbd "<C-right>") 'right-word)
  ;;(local-set-key (kbd "<C-left>") 'left-word)
  ;;(local-set-key (kbd "RET") 'electrify-return-if-match)
  (setq paredit-commands
	(remove-duplicates
	 (append 
	  '((("C-)" "M-<right>")
	     paredit-forward-slurp-sexp
	     ("(foo (bar |baz) quux zot)"
	      "(foo (bar |baz quux) zot)")
	     ("(a b ((c| d)) e f)"
	      "(a b ((c| d) e) f)"))
	    (("C-}" "M-<left>")
	     paredit-forward-barf-sexp
	     ("(foo (bar |baz quux) zot)"
	      "(foo (bar |baz) quux zot)"))
	    (("C-<right>")
	     right-word)
	    (("C-<left>")
	     left-word)
	    (("RET")
	     electrify-return-if-match ())))
	 :test 'equal))
  (paredit-define-keys)
  (paredit-annotate-mode-with-examples)
  (paredit-annotate-functions-with-examples)
  (show-paren-mode t))

(add-hook 'emacs-lisp-mode-hook       #'my-enable-paredit-mode)
;;(add-hook 'eval-expression-minibuffer-setup-hook #'my-enable-paredit-mode)
(add-hook 'ielm-mode-hook             #'my-enable-paredit-mode)
(add-hook 'lisp-mode-hook             #'my-enable-paredit-mode)
(add-hook 'lisp-interaction-mode-hook #'my-enable-paredit-mode)
(add-hook 'scheme-mode-hook           #'my-enable-paredit-mode)
(add-hook 'extempore-mode-hook        #'my-enable-paredit-mode)

;;;;;;;;;;;;;;;;;;;
;;;; extempore ;;;;
;;;;;;;;;;;;;;;;;;;

(autoload 'extempore-mode "~/dateien/src/extempore/extras/extempore.el" "" t)
(add-to-list 'auto-mode-alist '("\\.xtm$" . extempore-mode))
(setq user-extempore-directory "~/dateien/src/extempore/")
(setq extempore-program-args "--term nocolor")

;;;;;;;;;;;;;;
;;;; lisp ;;;;
;;;;;;;;;;;;;;

;;; slime
;;;;;;;;;

(load (expand-file-name "~/lisp/quicklisp/slime-helper.el"))
;; Replace "sbcl" with the path to your implementation
(setq inferior-lisp-program "sbcl")
;;(slime-setup '(slime-company))

;;; ac-slime
;;;;;;;;;;;;

(defun my-set-up-slime-ac ()
  (auto-complete-mode t)
  (set-up-slime-ac t) ; enable fuzzy completion (t)
  ;;(set-up-slime-ac) ; no fuzzy completion
  (delete 'ac-source-words-in-same-mode-buffers ac-sources))

;;(add-hook 'slime-mode-hook 'set-up-slime-ac)
;;(add-hook 'slime-repl-mode-hook 'set-up-slime-ac)
(add-hook 'slime-mode-hook 'my-set-up-slime-ac)
(add-hook 'slime-repl-mode-hook 'my-set-up-slime-ac)
(eval-after-load "auto-complete"
  '(add-to-list 'ac-modes 'slime-repl-mode))

;;;;;;;;;;;;;;;;;;;;;;;;
;;;; chicken scheme ;;;;
;;;;;;;;;;;;;;;;;;;;;;;;

(add-to-list 'load-path "/usr/lib/chicken/7/")
(autoload 'chicken-slime "chicken-slime" "SWANK backend for Chicken" t)

(add-hook 'scheme-mode-hook
          (lambda ()
            (slime-mode t)
            ;; disable fuzzy completion here
            (delete 'ac-source-slime-fuzzy ac-sources)))

;;;;;;;;;;;;;;
;;;; node ;;;;
;;;;;;;;;;;;;;

;;(require 'nodejs-repl)

;;;;;;;;;;;;;;;;
;;;; python ;;;;
;;;;;;;;;;;;;;;;

(elpy-enable)

;;;;;;;;;;;;;;;
;;;; latex ;;;;
;;;;;;;;;;;;;;;

(defun my-ac-auctex-startup ()
  (auto-complete-mode t)
  (require 'auto-complete-auctex))
(add-hook 'LaTeX-mode-hook 'my-ac-auctex-startup)

;;;;;;;;;;;;;;;;;;;
;;;; variables ;;;;
;;;;;;;;;;;;;;;;;;;

(custom-set-variables
 ;; custom-set-variables was added by Custom.
{'fraction_non_alphanumeric': 0.2488317757009346, 'fraction_numerical': 0.0003594536304816679, 'mean_word_length': 2.9338989042064334, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4160824', 'n_tokens_mistral': 4453, 'n_tokens_neox': 4157, 'n_words': 718}