Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
803 lines (669 sloc) 25.4 KB
(defun filter (pred lst)
"Use PRED to filter a list LST of elements."
(delq nil (mapcar (lambda (x) (and (funcall pred x) x)) lst)))
(require 'package)
(add-to-list 'package-archives
'("melpa-stable" . "") t)
(add-to-list 'package-archives
'("MELPA" . "") t)
(defvar my-packages)
(setq my-packages
;; Install missing packages:
(let ((uninstalled-packages (filter (lambda (x) (not (package-installed-p x)))
(when (and (not (equal uninstalled-packages '()))
(y-or-n-p (format "Install packages %s?" uninstalled-packages)))
(mapc 'package-install uninstalled-packages)))
;; Startup.........................................................
;; Some configuration to make things quieter on start up:
(setq inhibit-splash-screen t
initial-scratch-message nil)
;; Turn on recentf-mode for reopening recently used files:
(recentf-mode 1)
;; Stuff for running shells within Emacs...........................
;; Path Magic
;; Smooth the waters for starting processes from the shell. “Set up
;; Emacs’ `exec-path’ and PATH environment variable to match the
;; user’s shell. This is particularly useful under Mac OSX, where GUI
;; apps are not started from a shell[fn:: See
;; path-and-exec-path-set-but-emacs-does-not-find-executable]”.
(defun set-exec-path-from-shell-PATH ()
(let ((path-from-shell
"[ \t\n]*$" ""
(shell-command-to-string "$SHELL --login -i -c 'echo $PATH'"))))
(setenv "PATH" path-from-shell)
(setq exec-path (split-string path-from-shell path-separator))))
;; Kill shell buffers quickly.....................................
;; “With this snippet, [a second] press of C-d will kill the
;; buffer. It’s pretty nice, since you then just tap C-d twice to get
;; rid of the shell and go on about your merry way[fn:: From
(defun comint-delchar-or-eof-or-kill-buffer (arg)
(interactive "p")
(if (null (get-buffer-process (current-buffer)))
(comint-delchar-or-maybe-eof arg)))
(add-hook 'shell-mode-hook
(lambda ()
(define-key shell-mode-map
(kbd "C-d") 'comint-delchar-or-eof-or-kill-buffer)))
(global-unset-key "\C-o")
;; Moar Shells.........................................................
;; Create shell in new buffer when needed, rather than just loading up
;; the existing shell buffer.
(defun create-shell-in-new-buffer ()
(let ((currentbuf (get-buffer-window (current-buffer)))
(newbuf (generate-new-buffer-name "*shell*")))
(generate-new-buffer newbuf)
(set-window-dedicated-p currentbuf nil)
(set-window-buffer currentbuf newbuf)
(shell newbuf)))
(global-unset-key "\C-o")
(global-set-key "\C-oS" 'create-shell-in-new-buffer)
;; Term stuff
(defun create-term-shell ()
(term "/bin/bash"))
;; Per : fix autocomplete
(add-hook 'term-mode-hook (lambda()
(setq yas-dont-activate t)))
(global-set-key "\C-oT" 'create-term-shell)
;; Highlighting of long lines.....................................
(defun highlight-long-lines ()
"Turn on highlighting of long lines."
(highlight-lines-matching-regexp ".\\{81\\}" 'hi-pink))
(defun unhighlight-long-lines ()
"Turn off highlighting of long lines."
(unhighlight-regexp "^.*\\(?:.\\{81\\}\\).*$"))
;; Clojure mode hooks.............................................
(defun set-clojure-indents ()
;; Handling Clojure indentation for certain macros
(put-clojure-indent 'DELETE* 2)
(put-clojure-indent 'GET* 2)
(put-clojure-indent 'POST* 2)
(put-clojure-indent 'PUT* 2)
(put-clojure-indent 'DELETE 2)
(put-clojure-indent 'GET 2)
(put-clojure-indent 'POST 2)
(put-clojure-indent 'ANY 2)
(put-clojure-indent 'PUT 2)
(put-clojure-indent 'after 1)
(put-clojure-indent 'after-all 1)
(put-clojure-indent 'around 1)
(put-clojure-indent 'without-logging 0)
(put-clojure-indent 'before 0)
(put-clojure-indent 'before-all 0)
(put-clojure-indent 'context 2)
(put-clojure-indent 'context* 2)
(put-clojure-indent 'check-cw-metric 2)
(put-clojure-indent 'describe 1)
(put-clojure-indent 'describe-examples 2)
(put-clojure-indent 'describe-with-dawg 1)
(put-clojure-indent 'describe-with-db 1)
(put-clojure-indent 'describe-with-es 1)
(put-clojure-indent 'describe-with-mock-etl-state 1)
(put-clojure-indent 'describe-with-server 1)
(put-clojure-indent 'do-rate-limited 1)
(put-clojure-indent 'do-until-input 1)
(put-clojure-indent 'do-with-save-config 1)
(put-clojure-indent 'html/at 1)
(put-clojure-indent 'fact 1)
(put-clojure-indent 'facts 1)
(put-clojure-indent 'it 1)
(put-clojure-indent 'is 1)
(put-clojure-indent 'are 2)
(put-clojure-indent 'match 1)
(put-clojure-indent 'section 1)
(put-clojure-indent 'should 0)
(put-clojure-indent 'test-location 1)
(put-clojure-indent 'solves 0)
(put-clojure-indent 'metrics/time 1)
(put-clojure-indent 'problem 1)
(put-clojure-indent 'mock-dl-good-and-fast 0)
(put-clojure-indent 'mock-dl-bad 0)
(put-clojure-indent 'mock-dl-short 0)
(put-clojure-indent 'try 0)
(put-clojure-indent 'try+ 0)
(put-clojure-indent 'watcher 1)
(put-clojure-indent 'wcar 1)
(put-clojure-indent 'with 1)
(put-clojure-indent 'subsection 1)
(put-clojure-indent 'perf/p 1)
(put-clojure-indent 'log-timing 1)
(put-clojure-indent 'subsubsection 1))
(defun convert-selection-to-link ()
"For unmark: Convert selected text to Hiccup link"
(let* ((url (read-from-minibuffer "Enter link URL: "))
(bounds (if (use-region-p)
(cons (region-beginning) (region-end))
(bounds-of-thing-at-point 'symbol)))
(text (buffer-substring-no-properties (car bounds) (cdr bounds)))
(to-replace (insert (concat "\" [:a {:href \"" url "\"} \"" text "\"] \""))))
(when bounds
(delete-region (car bounds) (cdr bounds))
(insert to-replace))))
(defun convert-selection-to-code ()
"For unmark: Convert selected text to Hiccup link"
(let* ((bounds (if (use-region-p)
(cons (region-beginning) (region-end))
(bounds-of-thing-at-point 'symbol)))
(text (buffer-substring-no-properties (car bounds) (cdr bounds)))
(to-replace (insert (concat "\" [:code \"" text "\"] \""))))
(when bounds
(delete-region (car bounds) (cdr bounds))
(insert to-replace))))
(add-hook 'clojure-mode-hook
'(lambda ()
(paredit-mode 1)
;; (aggressive-indent-mode 1)
(clj-refactor-mode 1)
(yas-minor-mode 1) ; for adding require/use/import
(cljr-add-keybindings-with-prefix "C-c C-t")
(define-key clojure-mode-map (kbd "C-o x")
(define-key clojure-mode-map (kbd "C-o j") 'cider-jack-in)
(define-key clojure-mode-map (kbd "C-o J") 'cider-restart)
(define-key clojure-mode-map (kbd "C-o K") 'convert-selection-to-link)
(define-key clojure-mode-map (kbd "C-o C") 'convert-selection-to-code)
(define-key clojure-mode-map (kbd "C-<up>") 'paredit-backward)
(define-key clojure-mode-map (kbd "C-<down>") 'paredit-forward)
(define-key clojure-mode-map (kbd "C-o y")
(lambda ()
(insert "\n;;=>\n'")
(cider-eval-last-sexp 't)))
(define-key clojure-mode-map (kbd "C-o Y")
(lambda ()
(define-key clojure-mode-map (kbd "s-i") 'cider-eval-last-sexp)
(define-key clojure-mode-map (kbd "s-I")
'(lambda ()
(define-key clojure-mode-map (kbd "C-o C-i")
(lambda ()
(cider-auto-test-mode 1)))
(add-to-list 'auto-mode-alist '("\\.garden" . clojure-mode))
;; Find Leiningen.............................................
(add-to-list 'exec-path "/usr/local/bin")
;; Cider setup................................................
(add-hook 'cider-mode-hook #'eldoc-mode)
(setq cider-auto-select-error-buffer nil)
(setq cider-repl-pop-to-buffer-on-connect nil)
(setq cider-interactive-eval-result-prefix ";; => ")
(setq cider-repl-history-file (concat user-emacs-directory "../.cider-history"))
;; Fix
(defvar cider-eval-progress-bar-show nil)
(add-hook 'json-mode-hook
(lambda ()
(make-local-variable 'js-indent-level)
(setq js-indent-level 2)))
;; Lots of keybindings
;; Many of these are extremely old, having followed me from machine to
;; machine over the years. Some could probably be deleted.
(global-set-key [S-deletechar] 'kill-ring-save)
;; Set up the keyboard so the delete key on both the regular keyboard
;; and the keypad delete the character under the cursor and to the right
;; under X, instead of the default, backspace behavior.
(global-set-key [delete] 'delete-char)
(global-set-key [kp-delete] 'delete-char)
(define-key function-key-map "\e[1~" [find])
(define-key function-key-map "\e[2~" [insertchar])
(define-key function-key-map "\e[3~" [deletechar])
(define-key function-key-map "\e[4~" [select])
(define-key function-key-map "\e[5~" [prior])
(define-key function-key-map "\e[6~" [next])
(define-key global-map [select] 'set-mark-command)
(define-key global-map [insertchar] 'yank)
(define-key global-map [deletechar] 'kill-region)
(global-unset-key "\C- ")
(global-set-key [?\C- ] 'other-window)
(global-set-key "\C-oW" (lambda ()
(org-babel-load-file (concat user-emacs-directory
(global-set-key "\C-a" 'split-window-horizontally)
(global-set-key "\C-oa" 'split-window-vertically)
(global-set-key "\C-K" 'kill-line)
(global-set-key "\C-os" 'isearch-forward-regexp)
(global-set-key "\C-oD" 'find-name-dired)
(global-set-key "\C-xS" 'sort-lines)
(global-set-key "\C-w" 'backward-kill-word)
(global-set-key "\C-x\C-k" 'kill-region)
(global-set-key "\C-c\C-k" 'kill-region)
(global-set-key "\C-ok" 'comment-region)
(global-set-key "\C-c\C-f" 'recentf-open-files)
(global-set-key "\C-ou" 'uncomment-region)
(global-set-key "\C-on" 'er/expand-region)
(global-set-key "\C-om" 'magit-status)
(global-set-key "\C-oe" 'eval-current-buffer)
(global-set-key "\C-od" 'delete-horizontal-space)
(global-set-key "\C-oH" 'highlight-long-lines)
(global-set-key "\C-oh" 'unhighlight-long-lines)
(global-set-key "\C-ob" 'backward-word)
(global-set-key "\C-oB" 'bury-buffer)
(global-set-key "\C-oq" 'query-replace-regexp)
(global-set-key "\C-oL" (lambda ()
(global-set-key "\C-]" 'fill-region)
(global-set-key "\C-ot" 'beginning-of-buffer)
;; (global-set-key "\C-oT" 'toggle-window-split)
(global-set-key "\C-N" 'enlarge-window)
(global-set-key "\C-o\C-n" 'enlarge-window-horizontally)
(global-set-key "\C-oc" 'paredit-duplicate-closest-sexp)
(global-set-key "\C-ol" 'goto-line)
(global-set-key "\C-ob" 'end-of-buffer)
(global-set-key "\C-op" 'fill-region)
(global-set-key "\C-oP" 'fill-paragraph)
(global-set-key "\C-og" 'save-buffers-kill-emacs)
(global-set-key "\C-od" 'downcase-region)
(global-set-key "\C-or" 'rgrep)
(global-set-key "\C-L" 'delete-other-windows)
(global-set-key "\C-B" 'scroll-down)
(global-set-key "\C-F" 'scroll-up)
(global-set-key "\C-V" 'save-buffer)
(global-set-key "\C-R" 'isearch-forward)
(global-set-key "\C-^" 'wnt-alog-add-entry)
(global-set-key "\C-T" 'set-mark-command)
(global-set-key "\C-Y" 'yank)
(global-set-key "\C-D" 'backward-delete-char-untabify)
(global-set-key "\C-\\" 'shell)
(global-set-key "\C-oi" 'quoted-insert)
(global-set-key "\e[1~" 'isearch-forward)
(global-set-key [select] 'set-mark-command)
(global-set-key [insertchar] 'yank)
(global-set-key [deletechar] 'kill-region)
(global-set-key "\C-\\" 'shell)
(global-set-key "\C-oi" 'quoted-insert)
(global-set-key "\e[1~" 'isearch-forward)
(global-set-key [select] 'set-mark-command)
(global-set-key [insertchar] 'yank)
(global-set-key [deletechar] 'kill-region)
(global-set-key (kbd "s-0") 'org-todo-list)
;; Shortcuts for jumping directly into or evaluating commonly-used buffers:
(global-set-key "\C-oO" (lambda ()
(find-file "~/Dropbox/org/")))
(global-set-key "\C-o7" (lambda ()
(find-file "~/Dropbox/org/")))
(global-set-key "\C-o8" (lambda ()
(find-file "~/.bash_profile")))
(global-set-key "\C-oP" (lambda ()
(find-file "~/Dropbox/org/")))
(global-set-key "\C-oE" (lambda ()
(find-file "~/.emacs.d/init.el")))
(global-set-key "\C-o1"
(lambda ()
"(in-ns 'unmark.impl)
(generate-blog! \"/Users/jacobsen/Programming/\")
( \"open\" \"/Users/jacobsen/Programming/\")")))
;; Run marginalia on current project. You need
;; [michaelblume/marginalia "0.9.0"] installed in the dependencies for
;; that project.
(global-set-key "\C-o2"
(lambda ()
"(require 'marginalia.core)
(marginalia.core/run-marginalia nil)
( \"open\" \"docs/uberdoc.html\")"))))
;; Keyboard shortcuts for joining lines before and after point (thanks
;; to for the (join-line -1) trick):
(global-set-key "\C-oW" (lambda ()
(find-file "~/.emacs.d/init.el")
(message "ok!")))
;; Keyboard shortcuts for joining lines before and after point (thanks
;; to for the (join-line -1) trick):
(global-set-key (kbd "M-j")
(lambda () (interactive) (join-line -1)))
(global-set-key "\C-oo" 'join-line)
;; Show trailing whitespace, `cause we hates it....
(setq-default show-trailing-whitespace t)
;; Stuff related to configuring Emacs-in-a-window
;; When running GUI Emacs (i.e. on OS-X, which is the only way I run
;; Emacs these days anyways), set the theme to Zenburn, turn off
;; visual noise, fix up the PATH for shells, and allow resizing of
;; window.
(when window-system
(load-theme 'zenburn t)
(tool-bar-mode -1)
(scroll-bar-mode -1)
(global-set-key (kbd "s-=") 'text-scale-increase)
(global-set-key (kbd "s--") 'text-scale-decrease))
;; Don’t pop up newly-opened files in a new frame – use existing one:
(setq ns-pop-up-frames nil)
(defun jj-move-forward-and-eval ()
(lambda ()
(eval (preceding-sexp))))
;; General Lisp stuff
;; Rainbow delimiters for all programming major modes:
(require 'rainbow-delimiters)
(add-hook 'prog-mode-hook 'rainbow-delimiters-mode)
;; Show paren balancing nicely:
(require 'paren)
(set-face-background 'show-paren-match "white")
(add-hook 'prog-mode-hook 'show-paren-mode)
;; Stuff for Editing Emacs Lisp......................
;; I add a hook for evaluating the expression just before point; I’ve
;; played with auto-indent-mode and flycheck-mode but tired of them. I
;; do want paredit though.
(define-key emacs-lisp-mode-map (kbd "<s-return>") 'eval-last-sexp)
;;(add-hook 'emacs-lisp-mode-hook 'flycheck-mode)
;;(add-hook 'emacs-lisp-mode-hook 'auto-indent-mode)
(add-hook 'emacs-lisp-mode-hook
(lambda ()
(paredit-mode 1)
(aggressive-indent-mode 1)))
(define-key emacs-lisp-mode-map (kbd "s-i")
(define-key emacs-lisp-mode-map (kbd "s-I")
(lambda ()
;; M$ interop................
;; Hide ^M. From\
;; dont-display-m-characters-with-emacs:
(defun hide-ctrl-M ()
"Hides the disturbing '^M' showing up in files containing mixed UNIX
and DOS line endings."
(setq buffer-display-table (make-display-table))
(aset buffer-display-table ?\^M []))
(add-to-list 'auto-mode-alist '("\\.json$" . js-mode))
;; Hideshow Package...........
(load-library "hideshow")
(add-hook 'clojure-mode-hook 'hs-minor-mode)
(global-set-key [backtab] 'hs-toggle-hiding)
(defvar hs-special-modes-alist
(mapcar 'purecopy
'((c-mode "{" "}" "/[*/]" nil nil)
(c++-mode "{" "}" "/[*/]" nil nil)
(bibtex-mode ("@\\S(*\\(\\s(\\)" 1))
(java-mode "{" "}" "/[*/]" nil nil)
(js-mode "{" "}" "/[*/]" nil)
(js-mode "`" "`" "/[*/]" nil))))
;; Indentation
(setq js-indent-level 2)
(setq js2-highlight-level 3)
;; JavaScript.................
;; c.f. :
(add-hook 'js-mode-hook
(lambda ()
(require 'nodejs-repl)
(paredit-mode 1)
(hs-minor-mode 1)
(define-key js-mode-map "{" 'paredit-open-curly)
(define-key js-mode-map "}" 'paredit-close-curly-and-newline)
(define-key js-mode-map (kbd "C-o j") 'nodejs-repl)
(define-key js-mode-map (kbd "s-i") 'nodejs-repl-send-last-sexp)
(setq-default indent-tabs-mode nil)
(define-key js-mode-map (kbd "s-I") 'nodejs-repl-send-region)
(set (make-local-variable 'paredit-space-for-delimiter-predicates)
'((lambda (endp delimiter) nil)))
(aggressive-indent-mode 1)))
;; Company Mode............
;; stolen from\
;; fe7997bc6e05647a935e279094a9c571d175e2dc/modules/prelude-company.el
(require 'company)
(setq company-idle-delay 0.5)
(setq company-tooltip-limit 10)
(setq company-minimum-prefix-length 2)
;; invert the navigation direction if the the completion popup-isearch-match
;; is displayed on top (happens near the bottom of windows)
(setq company-tooltip-flip-when-above t)
(global-company-mode 1)
;; Correcting single-whitespaced toplevel forms
(defun correct-single-whitespace ()
"Correct single-spaced Lisp toplevel forms."
(goto-char 1)
(while (search-forward-regexp ")\n\n(" nil t)
(replace-match ")\n\n\n(" t nil)))
(global-set-key "\C-oQ" 'correct-single-whitespace)
;; Helm.......................
(require 'helm)
(global-set-key (kbd "M-x") 'helm-M-x)
(helm-mode 1)
;; Projectile.................
(setq projectile-completion-system 'helm)
;; Hideshow Package...........
(load-library "hideshow")
(add-hook 'clojure-mode-hook 'hs-minor-mode)
(add-hook 'html-mode-hook 'hs-minor-mode)
(global-set-key [backtab] 'hs-toggle-hiding)
;; Org Mode...................
(require 'org)
(require 'org-install)
(require 'ob-tangle)
'org-babel-load-languages '(;; (sh . t)
(clojure . t)
(plantuml . t)))
(setq org-plantuml-jar-path
(expand-file-name "~/bin/plantuml.jar"))
(setq my/org-babel-evaluated-languages
'(emacs-lisp plantuml))
(defun my-org-confirm-babel-evaluate (lang body)
(and (not (string= lang "ditaa"))
(not (string= lang "plantuml"))))
(setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
;; (defun my-org-confirm-babel-evaluate (lang body)
;; (and (not (string= lang "plantuml"))
;; (not (string= lang "clojure"))
;; (not (string= lang "sh"))))
(add-to-list 'my/org-babel-evaluated-languages 'plantuml)
;; (org-babel-do-load-languages
;; 'org-babel-load-languages
;; (mapcar (lambda (lang)
;; (cons lang t))
;; my/org-babel-evaluated-languages))
;; (setq org-confirm-babel-evaluate 'my-org-confirm-babel-evaluate)
(setq org-babel-clojure-backend 'cider)
(require 'ob-clojure)
;;(require 'cider)
;; (org-babel-load-file (concat user-emacs-directory "org/"))
;; (org-babel-load-file "")
;; Export ” as “ and ”:
(setq org-export-with-smart-quotes t)
;; GTD-style TODO states:
(setq org-todo-keywords
;; (setq org-log-done 'time)
(setq org-todo-keyword-faces
'(("TODO" . org-warning)
("STARTED" . "yellow")
("DONE" . "#5F7F5F")
("ELSEWHERE" . "#5F7F5F")
("CANCELED" . "#8CD0D3")))
;; Convert eval results to SRC blocks
(defun replace-next-results-block ()
(search-forward "#+RESULTS:" nil t)
(replace-match "#+BEGIN_SRC")
(while (string= (string (char-after)) ":")
(delete-char 2)
(insert "#+END_SRC\n"))
(global-set-key (kbd "s-r")
(lambda ()
;; Magit / GitHub ...........
(require 'magit-gh-pulls)
(add-hook 'magit-mode-hook 'turn-on-magit-gh-pulls)
;; custom-set-variables was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
'(cljr-favor-prefix-notation t)
'(magit-push-always-verify nil)
'(recentf-max-menu-items 100))
;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful.
;; Your init file should contain only one such instance.
;; If there is more than one, they won't work right.
;; Yasnippet
(require 'yasnippet)
(yas-global-mode 1)
(add-to-list 'yas-snippet-dirs "~/.emacs.d/snippets")
(yas-load-directory "~/.emacs.d/snippets")
;; Org / Yasnippet conflict (
(add-hook 'org-mode-hook
(lambda ()
(org-set-local 'yas/trigger-key [tab])
(yas-minor-mode 1)
(require 'ob-plantuml)
(define-key org-mode-map (kbd "C-a") 'split-window-horizontally)
(define-key yas/keymap [tab] 'yas/next-field-or-maybe-expand)))
;; Moving sexps up and down.......................................
(defun reverse-transpose-sexps (arg)
(interactive "*p")
(transpose-sexps (- arg))
;; when transpose-sexps can no longer transpose, it throws an error and code
;; below this line won't be executed. So, we don't have to worry about side
;; effects of backward-sexp and forward-sexp.
(backward-sexp arg)
(forward-sexp 1))
(global-set-key (kbd "S-s-<down>")
(lambda ()
(transpose-sexps 1)))
(global-set-key (kbd "S-s-<up>")
(lambda ()
(reverse-transpose-sexps 1)))
;; Multiple cursors
(require 'multiple-cursors)
(global-set-key (kbd "C-S-c C-S-c") 'mc/edit-lines)
(global-set-key (kbd "C->") 'mc/mark-next-like-this)
(global-set-key (kbd "C-<") 'mc/mark-previous-like-this)
(global-set-key (kbd "C-c C-<") 'mc/mark-all-like-this)
;; Backups...........................
;; Tell Emacs to write backup files to their own directory, and make backups even for files in revision control:
(setq backup-directory-alist
`(("." . ,(expand-file-name
(concat user-emacs-directory "backups")))))
(setq vc-make-backup-files t)
;; Weather Forecast
(require 'forecast)
(setq forecast-latitude 41.881832
forecast-longitude -87.623177
forecast-chicago "Chicago"
forecast-country "USA"
forecast-units 'us)
;;(load (locate-user-emacs-file "forecast-api-key.el"))
;; Pesky dialog boxes :-(
(defadvice yes-or-no-p (around prevent-dialog activate)
"Prevent yes-or-no-p from activating a dialog"
(let ((use-dialog-box nil))
(defadvice y-or-n-p (around prevent-dialog-yorn activate)
"Prevent y-or-n-p from activating a dialog"
(let ((use-dialog-box nil))
;; Open at startup:
(find-file (concat (getenv "HOME") "/Dropbox/org/"))
;; Omit #@!(*&^&! tabs!!!!
(setq-default indent-tabs-mode nil)
;; Markdown mode
'(markdown-command "/usr/local/bin/markdown"))
;; Beacon Mode
(beacon-mode 1)
(setq beacon-push-mark 35)
(setq beacon-color "#888888")
;; which-key
(require 'which-key)
;; Pop shells in current frame
(add-to-list 'display-buffer-alist
`(,(regexp-quote "*shell") display-buffer-same-window))
;; suppress irritating terminal warnings:
(setenv "PAGER" "cat")
;; Tagedit (
(eval-after-load "sgml-mode"
(require 'tagedit)
(add-hook 'html-mode-hook (lambda () (tagedit-mode 1)))))
(provide 'init)
(put 'upcase-region 'disabled nil)
(put 'downcase-region 'disabled nil)