Commits

Moritz Heidkamp committed 41b7097

initial import

  • Participants

Comments (0)

Files changed (29)

+elpa
+anything-c-adaptive-history
+(custom-set-variables
+ ;; 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.
+ '(auth-source-save-behavior nil)
+ '(custom-safe-themes (quote ("649ccffdb140fcd021013f6297dedeb313b74fa5" default)))
+ '(send-mail-function (quote smtpmail-send-it)))
+(custom-set-faces
+ ;; 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.
+ '(highline-face ((t (:background "gray17")))))
+(require 'package)
+
+(add-to-list
+ 'package-archives
+ '("marmalade" . "http://marmalade-repo.org/packages/"))
+
+(package-initialize)
+
+(require 'cl)
+
+(add-to-list 'load-path "/home/syn/.emacs.d/lib")
+
+(defun load-my (file)
+  (load (concat "~/.emacs.d/my/" (symbol-name file))))
+
+;; global
+(load-my 'theme)
+(load-my 'general)
+(load-my 'auto-save)
+(load-my 'keys)
+(load-my 'scpaste)
+(load-my 'hippie-expand)
+(load-my 'browse-url)
+(load-my 'smooth-scrolling)
+(load-my 'anything)
+(load-my 'printing)
+
+;; mail
+(load-my 'mail)
+
+;; modes
+(load-my 'bbdb)
+(load-my 'highlight-parentheses)
+(load-my 'highlight-symbol)
+(load-my 'magit)
+(load-my 'org)
+(load-my 'ruby)
+(load-my 'highline)
+
+;; ido
+(load-my 'ido)
+(load-my 'ido-goto-symbol)
+
+;; lisp
+(load-my 'paredit)
+(load-my 'elisp)
+(load-my 'scheme)
+(load-my 'chicken)
+(load-my 'clojure)
+(load-my 'slime)

File lib/smooth-scrolling.el

+;; smooth-scrolling.el
+;; $Id$
+;; Adam Spiers <emacs-ss@adamspiers.org>
+;; 
+;; Make emacs scroll smoothly, keeping the point away from the top and
+;; bottom of the current buffer's window in order to keep lines of
+;; context around the point visible as much as possible, whilst
+;; avoiding sudden scroll jumps which are visually confusing.
+;;
+;; This is a nice alternative to all the native scroll-* custom
+;; variables, which unfortunately cannot provide this functionality
+;; perfectly.  `scroll-margin' comes closest, but has some bugs
+;; (e.g. with handling of mouse clicks).  See
+;;
+;;   http://www.emacswiki.org/cgi-bin/wiki/SmoothScrolling
+;;
+;; for the gory details.
+;;
+;;;_* Installation
+;;
+;; Put somewhere on your `load-path' and include
+;;
+;;   (require 'smooth-scrolling)
+;;
+;; in your .emacs initialization file.
+;;
+;;;_* Notes
+;;
+;; This only affects the behaviour of the `next-line' and
+;; `previous-line' functions, usually bound to the cursor keys and
+;; C-n/C-p, and repeated isearches (`isearch-repeat').  Other methods
+;; of moving the point will behave as normal according to the standard
+;; custom variables.
+;;
+;; Prefix arguments to `next-line' and `previous-line' are honoured.
+;; The minimum number of lines are scrolled in order to keep the
+;; point outside the margin.
+;;
+;; There is one case where moving the point in this fashion may cause
+;; a jump: if the point is placed inside one of the margins by another
+;; method (e.g. left mouse click, or M-x goto-line) and then moved in
+;; the normal way, the advice code will scroll the minimum number of
+;; lines in order to keep the point outside the margin.  This jump may
+;; cause some slight confusion at first, but hopefully it is justified
+;; by the benefit of automatically ensuring `smooth-scroll-margin'
+;; lines of context are visible around the point as often as possible.
+;;
+;;;_* TODO
+;;
+;; - Maybe add option to avoid scroll jumps when point is within
+;;   margin.
+;; 
+;;;_* Acknowledgements
+;; 
+;; Thanks to Mark Hulme-Jones and consolers on #emacs for helping
+;; debug issues with line-wrapping.
+;; 
+;;;_* License
+;; 
+;; Released under the GNU General Public License v2 or later, with
+;; all rights assigned to the Free Software Foundation.
+;;
+
+;;;_* Code follows
+;;;_ + disable `scroll-margin'
+(setq scroll-margin 0)
+;;;_ + defcustoms
+(defcustom smooth-scroll-margin 10
+  "Number of lines of visible margin at the top and bottom of a window.
+If the point is within these margins, then scrolling will occur
+smoothly for `previous-line' at the top of the window, and for
+`next-line' at the bottom.
+
+This is very similar in its goal to `scroll-margin'.  However, it
+is implemented by activating `smooth-scroll-down' and
+`smooth-scroll-up' advise via `defadvice' for `previous-line' and
+`next-line' respectively.  As a result it avoids problems
+afflicting `scroll-margin', such as a sudden jump and unexpected
+highlighting of a region when the mouse is clicked in the margin.
+
+Scrolling only occurs when the point is closer to the window
+boundary it is heading for (top or bottom) than the middle of the
+window.  This is to intelligently handle the case where the
+margins cover the whole buffer (e.g. `smooth-scroll-margin' set
+to 5 and `window-height' returning 10 or less).
+
+See also `smooth-scroll-strict-margins'."
+  :type  'integer
+  :group 'windows)
+
+(defcustom smooth-scroll-strict-margins t
+  "If true, the advice code supporting `smooth-scroll-margin'
+will use `count-screen-lines' to determine the number of
+*visible* lines between the point and the window top/bottom,
+rather than `count-lines' which obtains the number of actual
+newlines.  This is because there might be extra newlines hidden
+by a mode such as folding-mode, outline-mode, org-mode etc., or
+fewer due to very long lines being displayed wrapped when
+`truncate-lines' is nil.
+
+However, using `count-screen-lines' can supposedly cause
+performance issues in buffers with extremely long lines.  Setting
+`cache-long-line-scans' may be able to address this;
+alternatively you can set this variable to nil so that the advice
+code uses `count-lines', and put up with the fact that sometimes
+the point will be allowed to stray into the margin."
+  :type  'boolean
+  :group 'windows)
+;;;_ + helper functions
+(defun smooth-scroll-lines-from-window-top ()
+  "Work out, using the function indicated by
+`smooth-scroll-strict-margins', what the current screen line is,
+relative to the top of the window.  Counting starts with 1 referring
+to the top line in the window."
+  (interactive)
+  (cond ((= (window-start) (point))
+         ;; In this case, count-screen-lines would return 0, so we override.
+         1)
+        (smooth-scroll-strict-margins
+         (count-screen-lines (window-start) (point) 'count-final-newline))
+        (t
+         (count-lines (window-start) (point)))))
+
+(defun smooth-scroll-lines-from-window-bottom ()
+  "Work out, using the function indicated by
+`smooth-scroll-strict-margins', how many screen lines there are
+between the point and the bottom of the window.  Counting starts
+with 1 referring to the bottom line in the window."
+  (interactive)
+  (if smooth-scroll-strict-margins
+      (count-screen-lines (point) (window-end))
+    (count-lines (point) (window-end))))
+;;;_ + after advice
+
+(defun smooth-scroll-down ()
+  "Scroll down smoothly if cursor is within `smooth-scroll-margin'
+lines of the top of the window."
+  (and
+   ;; Only scroll down if there is buffer above the start of the window.
+   (> (line-number-at-pos (window-start)) 1)
+   (let ((lines-from-window-top
+          (smooth-scroll-lines-from-window-top)))
+     (and
+      ;; Only scroll down if we're within the top margin
+      (<= lines-from-window-top smooth-scroll-margin)
+      ;; Only scroll down if we're in the top half of the window
+      (<= lines-from-window-top
+          ;; N.B. `window-height' includes modeline, so if it returned 21,
+          ;; that would mean exactly 10 lines in the top half and 10 in
+          ;; the bottom.  22 (or any even number) means there's one in the
+          ;; middle.  In both cases the following expression will
+          ;; yield 10:
+          (/ (1- (window-height)) 2))
+      (save-excursion
+        (scroll-down
+              (1+ (- smooth-scroll-margin lines-from-window-top))))))))
+                            
+(defun smooth-scroll-up ()
+  "Scroll up smoothly if cursor is within `smooth-scroll-margin'
+lines of the bottom of the window."
+  (and
+   ;; Only scroll up if there is buffer below the end of the window.
+   (< (window-end) (buffer-end 1))
+   (let ((lines-from-window-bottom
+          (smooth-scroll-lines-from-window-bottom)))
+     (and
+      ;; Only scroll up if we're within the bottom margin
+      (<= lines-from-window-bottom smooth-scroll-margin)
+      ;; Only scroll up if we're in the bottom half of the window.
+      (<= lines-from-window-bottom
+          ;; See above notes on `window-height'.
+          (/ (1- (window-height)) 2))
+      (save-excursion
+        (scroll-up
+         (1+ (- smooth-scroll-margin lines-from-window-bottom))))))))
+
+(defadvice previous-line (after smooth-scroll-down
+                            (&optional arg try-vscroll)
+                            activate)
+  (smooth-scroll-down))
+(defadvice next-line (after smooth-scroll-up
+                            (&optional arg try-vscroll)
+                            activate)
+  (smooth-scroll-up))
+
+(defadvice isearch-repeat (after isearch-smooth-scroll
+                                 (direction)
+                                 activate)
+  (if (eq direction 'forward)
+      (smooth-scroll-up)
+    (smooth-scroll-down)))
+
+;;;_ + provide
+(provide 'smooth-scrolling)
+
+;;;_* Local emacs variables
+
+;;Local variables:
+;;allout-layout: (0 : -1 0)
+;;mode: allout
+;;End:

File my/anything.el

+(require 'anything-config)
+
+(defun my-anything ()
+  (interactive)
+  (anything-other-buffer
+   '(anything-c-source-buffers+
+     anything-c-source-files-in-current-dir+
+     anything-c-source-recentf)
+   " *my-anything*"))
+
+(global-set-key (kbd "C-c C-a") 'my-anything)

File my/auto-save.el

+;; store tempfiles a in central place, cf. http://amitp.blogspot.com/2007/03/emacs-move-autosave-and-backup-files.html
+(defvar user-temporary-file-directory
+  (concat (getenv "HOME") "/.emacs-tmp/"))
+
+(make-directory user-temporary-file-directory t)
+(setq backup-by-copying t)
+(setq backup-directory-alist
+      `((,tramp-file-name-regexp nil)
+        ("." . ,user-temporary-file-directory)))
+(setq auto-save-list-file-prefix
+      (concat user-temporary-file-directory ".auto-save-"))
+(setq auto-save-file-name-transforms
+      `((".*" ,user-temporary-file-directory t)))

File my/browse-url.el

+(setq browse-url-browser-function 'browse-url-generic)
+(setq browse-url-generic-program "conkeror")

File my/chicken.el

+(eval-after-load 'scheme
+  '(progn
+     (defun chicken-doc ()
+       (interactive)
+       (let ((func (current-word)))
+	 (when func
+	   (process-send-string "*scheme*"
+				(format "(require-library chicken-doc) ,doc %S\n" func))
+	   (save-selected-window
+	     (select-window (display-buffer "*scheme*" t))
+	     (goto-char (point-max))))))
+     (define-key scheme-mode-map (kbd "C-c C-d") 'chicken-doc)))

File my/clojure.el

+(autoload 'clojure-mode "clojure-mode" "Mode for editing Clojure source files")
+(add-to-list 'auto-mode-alist '("\\.clj$" . clojure-mode))
+(add-to-list 'auto-mode-alist '("\\.cljs$" . clojure-mode))
+
+(add-hook 'clojure-mode-hook (lambda () 
+                               (show-paren-mode t)
+                               (paredit-mode t)
+                               (highlight-parentheses-mode t)))
+
+
+(add-to-list 'load-path "/usr/share/emacs/site-lisp/swank-clojure")
+(require 'swank-clojure)
+
+(setq swank-clojure-jar-path "/usr/share/clojure/clojure.jar"
+      swank-clojure-extra-classpaths 
+      '("/usr/share/emacs/site-lisp/swank-clojure/src/swank"
+        "/usr/share/clojure/clojure-contrib.jar"))
+
+(eval-after-load 'clojure-mode
+  '(define-clojure-indent
+     (describe 'defun)
+     (testing 'defun)
+     (given 'defun)
+     (using 'defun)
+     (with 'defun)
+     (it 'defun)
+     (do-it 'defun)
+     (let-uri-parts 'defun)))
+
+;; slime
+(eval-after-load "slime" 
+  '(progn (slime-setup '(slime-repl))))
+ 
+(add-hook 'emacs-lisp-mode-hook (lambda ()
+				  (show-paren-mode t)
+				  (paredit-mode t)))

File my/general.el

+(setq-default kill-read-only-ok t)
+(setq-default indent-tabs-mode nil)
+(setq confirm-kill-emacs 'y-or-n-p)
+(setq transient-mark-mode t)
+
+(tool-bar-mode -1)
+(menu-bar-mode -1)
+(scroll-bar-mode -1)
+
+(put 'downcase-region 'disabled nil)
+(put 'set-goal-column 'disabled nil)
+(put 'narrow-to-region 'disabled nil)
+(setq custom-file "~/.emacs.d/custom")
+(load custom-file 'noerror)
+
+(fset 'yes-or-no-p 'y-or-n-p)
+
+(defadvice kill-ring-save (before slick-copy activate compile)
+  "When called interactively with no active region, copy a single line instead."
+  (interactive
+   (if mark-active (list (region-beginning) (region-end))
+     (message "Copied line")
+     (list (line-beginning-position)
+           (line-beginning-position 2)))))
+
+(defadvice kill-region (before slick-cut activate compile)
+  "When called interactively with no active region, kill a single line instead."
+  (interactive
+   (if mark-active (list (region-beginning) (region-end))
+     (list (line-beginning-position)
+           (line-beginning-position 2)))))
+
+(defun copy-sexp (&optional arg)
+  "Copy a s-expression instead of killing it."
+  (interactive "P")
+  (save-excursion
+    (toggle-read-only 1)
+    (kill-sexp arg)
+    (toggle-read-only 0)))

File my/highlight-parentheses.el

+(setq
+ hl-paren-colors '()
+ hl-paren-background-colors (list "#4f4f4f" "#4f4f4f" "#4f4f4f" "#4f4f4f" "#4f4f4f" "#4f4f4f" "#4f4f4f"))
+
+(add-hook 'scheme-mode-hook
+          (lambda () 
+            (highlight-parentheses-mode t)))
+
+(add-hook 'emacs-lisp-mode-hook
+          (lambda () 
+            (highlight-parentheses-mode t)))

File my/highlight-symbol.el

+(setq highlight-symbol-idle-delay 0)

File my/highline.el

+(require 'highline)

File my/hippie-expand.el

+(setq hippie-expand-try-functions-list
+      '(try-expand-dabbrev
+	try-expand-dabbrev-all-buffers
+	try-complete-file-name))
+
+(defun indent-or-hippie-expand ()
+  "Complete if point is at end of a word, indent otherwise."
+  (interactive)
+
+  (if (looking-at "\\_>")
+      ;; skip message output
+      (flet ((message (format-string &rest args) nil))
+	(hippie-expand nil))
+
+    ;; otherwise indent line
+    (indent-for-tab-command)))
+
+(defun indent-and-hippie-expand ()
+  "Complete if point is at the end of a word and indent."
+  (interactive)
+
+  (if (looking-at "\\_>")
+      ;; skip message output
+      (flet ((message (format-string &rest args) nil))
+	(hippie-expand nil)))
+
+  ;; always indent line
+  (indent-for-tab-command))
+
+
+(define-key (current-global-map)
+  (kbd "TAB")
+  'indent-and-hippie-expand)
+
+(define-key (current-global-map)
+  (kbd "C-<tab>")
+  'hippie-expand)

File my/ido-goto-symbol.el

+;; http://www.emacswiki.org/emacs/ImenuMode#toc10
+
+(defun ido-goto-symbol (&optional symbol-list)
+  "Refresh imenu and jump to a place in the buffer using Ido."
+  (interactive)
+  (unless (featurep 'imenu)
+    (require 'imenu nil t))
+  (cond
+   ((not symbol-list)
+    (let ((ido-mode ido-mode)
+          (ido-enable-flex-matching
+           (if (boundp 'ido-enable-flex-matching)
+               ido-enable-flex-matching t))
+          name-and-pos symbol-names position)
+      (unless ido-mode
+        (ido-mode 1)
+        (setq ido-enable-flex-matching t))
+      (while (progn
+               (imenu--cleanup)
+               (setq imenu--index-alist nil)
+               (ido-goto-symbol (imenu--make-index-alist))
+               (setq selected-symbol
+                     (ido-completing-read "Symbol? " symbol-names))
+               (string= (car imenu--rescan-item) selected-symbol)))
+      (unless (and (boundp 'mark-active) mark-active)
+        (push-mark nil t nil))
+      (setq position (cdr (assoc selected-symbol name-and-pos)))
+      (cond
+       ((overlayp position)
+        (goto-char (overlay-start position)))
+       (t
+        (goto-char position)))))
+   ((listp symbol-list)
+    (dolist (symbol symbol-list)
+      (let (name position)
+        (cond
+         ((and (listp symbol) (imenu--subalist-p symbol))
+          (ido-goto-symbol symbol))
+         ((listp symbol)
+          (setq name (car symbol))
+          (setq position (cdr symbol)))
+         ((stringp symbol)
+          (setq name symbol)
+          (setq position
+                (get-text-property 1 'org-imenu-marker symbol))))
+        (unless (or (null position) (null name)
+                    (string= (car imenu--rescan-item) name))
+          (add-to-list 'symbol-names name)
+          (add-to-list 'name-and-pos (cons name position))))))))
+
+
+(global-set-key (kbd "M-i") 'ido-goto-symbol)
+(setq ido-enable-flex-matching t)
+(setq ido-max-directory-size 100000)
+(ido-mode t)
+(ido-everywhere t)
+
+(require 'ido-ubiquitous)
+(ido-ubiquitous-mode t)
+(let ((keys
+       '(("C-x j"   . join-line)
+	 ("M-n"     . forward-paragraph)
+	 ("M-p"     . backward-paragraph)
+	 ("C-z"     . ignore)
+	 ("C-x C-z" . ignore)
+	 ("C-M-w"   . copy-sexp))))
+
+  (dolist (key keys)
+    (define-key (current-global-map)
+      (read-kbd-macro (car key))
+      (cdr key))))
+(global-set-key (kbd "C-c i") 'magit-status)
+(add-to-list 'load-path "/usr/share/emacs/site-lisp/org_contrib/lisp")
+
+(require 'org-protocol)
+
+(setq
+ org-hide-leading-stars t
+ org-odd-levels-only t)
+
+(org-remember-insinuate)
+
+(setq
+ org-directory "~/org"
+ org-default-notes-file "notes.org"
+ org-remember-templates
+ '(("Todo" ?t "* TODO %?\n  %i\n  %a" "todo.org" "Tasks")
+   ("URL" ?w "* %^{Title}\n\n  Source: %u, %c\n\n  %i" nil "URLs")
+   ("Note" ?n "* %^{Title}\n  %i\n  %a" nil "Notes")
+   ("Quote" ?q "* %t  %^g\n\n%c" "quotes.org"  "Quotes")
+   ("Fitness" ?f "* %T %^{Reps} %^g" "fitness.org" "Stats")))
+
+
+(define-key global-map "\C-cr" 'org-remember)
+
+
+;; http://tsdh.wordpress.com/2008/11/14/calling-org-remember-from-inside-conkeror/
+;; (defun th-org-remember-conkeror (url)
+;;   (interactive "s")
+;;   (org-remember nil ?u)
+;;   (save-excursion
+;;     (insert "\n\n  [[" url "]]")))
+;;   ;; (local-set-key (kbd "C-c C-c")
+;;   ;; 		 (lambda ()
+;;   ;; 		   (interactive)
+;;   ;; 		   (org-ctrl-c-ctrl-c)
+;;   ;; 		   (delete-frame nil t))))

File my/paredit.el

+(require 'paredit)

File my/printing.el

+(setq lpr-command "gtklp")
+(add-to-list 'auto-mode-alist '("\\.rake$" . ruby-mode))
+(add-to-list 'auto-mode-alist '("/Gemfile$" . ruby-mode))
+
+(defun ruby-end-return ()
+  "Called when RET-key is pressed."
+  (interactive)
+  (when (ruby-end-expand-p)
+    (ruby-end-insert-end))
+  (insert "\n")
+  (ruby-indent-line))
+
+(add-hook 'ruby-mode-hook
+          (lambda ()
+            (define-key ruby-mode-map
+              (kbd "TAB")
+              'indent-and-hippie-expand)
+
+            (setq-default ruby-end-insert-newline nil)
+            (ruby-end-mode t)
+
+            (define-key ruby-end-mode-map
+              (kbd "RET")
+              'ruby-end-return)))

File my/scheme.el

+(add-to-list 'auto-mode-alist '("\\.scss$" . scheme-mode))
+(add-to-list 'auto-mode-alist '("\\.sxml$" . scheme-mode))
+(add-to-list 'auto-mode-alist '("\\.setup$" . scheme-mode))
+(add-to-list 'auto-mode-alist '("\\.meta$" . scheme-mode))
+(add-to-list 'auto-mode-alist '("\\.release-info$" . scheme-mode))
+(add-to-list 'auto-mode-alist '("\\.system$" . scheme-mode))
+
+(eval-after-load 'scheme
+  '(progn
+     (add-hook 'scheme-mode-hook
+	       (lambda () 
+		 (show-paren-mode t)
+		 (paredit-mode t)))
+
+     (setq scheme-program-name "~/.rbenv/shims/csi -n")
+     
+     (defun scheme-send-buffer ()
+       (interactive)
+       (save-excursion
+	 (scheme-send-region (point-min) (point-max))))
+     
+     (define-key scheme-mode-map (kbd "C-c C-b") 'scheme-send-buffer)
+     
+     (defun scheme-module-indent (state indent-point normal-indent) 0)
+
+     (put 'module 'scheme-indent-function 'scheme-module-indent)
+     (put 'parameterize 'scheme-indent-function 1)
+     (put 'receive 'scheme-indent-function 2)
+     (put 'when 'scheme-indent-function 1)
+     (put 'unless 'scheme-indent-function 1)
+     (put 'let-optionals 'scheme-indent-function 2)
+     (put 'call-with-input-string 'scheme-indent-function 1)
+     (put 'with-input-from-string 'scheme-indent-function 1)
+     (put 'call-with-input-pipe 'scheme-indent-function 1)
+     (put 'with-input-from-pipe 'scheme-indent-function 1)
+     (put 'call-with-output-string 'scheme-indent-function 1)
+     (put 'with-output-to-string 'scheme-indent-function 1)
+     (put 'call-with-output-pipe 'scheme-indent-function 1)
+     (put 'with-output-to-pipe 'scheme-indent-function 1)
+     (put 'test-group 'scheme-indent-function 1)
+     (put 'test 'scheme-indent-function 0)
+     (put 'regex-case 'scheme-indent-function 1)
+     (put 'and-let* 'scheme-indent-function 1)
+     (put 'let-values 'scheme-indent-function 1)
+     (put 'let*-values 'scheme-indent-function 1)
+     (put 'with-headers 'scheme-indent-function 1)
+     (put 'match-let 'scheme-indent-function 1)
+     (put 'match 'scheme-indent-function 1)
+     (put 'http-accept-case 'scheme-indent-function 1)
+     (put 'wrap-defstruct-multi-assignment 'scheme-indent-function 1)
+     (put 'with-output-to-process 'scheme-indent-function 1)
+     (put 'with-request-vars 'scheme-indent-function 2)
+     (put 'with-request-vars* 'scheme-indent-function 2)
+     (put 'with-request-variables 'scheme-indent-function 1)
+     (put 'with-input-from-request 'scheme-indent-function 2)
+     (put 'call-with-input-from-request 'scheme-indent-function 2)
+     (put 'call-with-returning 'scheme-indent-function 1)
+     (put 'with-input-from-source-file 'scheme-indent-function 1)
+     (put 'with-input-for-compilation 'scheme-indent-function 1)
+     (put 'call-with-sql-engine 'scheme-indent-function 1)
+     (put 'call-with-value-from-pool 'scheme-indent-function 1)
+     (put 'call-with-value-from-pool-in-thread 'scheme-indent-function 1)
+     (put 'with-connection 'scheme-indent-function 1)
+     (put 'with-transaction 'scheme-indent-function 1)
+     (put 'register-handler 'scheme-indent-function 1)
+     (put 'let-optionals* 'scheme-indent-function 2)
+     (put 'call-with-connection 'scheme-indent-function 2)
+     (put 'condition-case 'scheme-indent-function 1)
+     (put 'select 'scheme-indent-function 1)
+     (put 'http-match 'scheme-indent-function 1)
+     (put 'let-location 'scheme-indent-function 1)
+     (put 'generic-let 'scheme-indent-function 1)
+     (put 'handle-exceptions 'scheme-indent-function 1)
+     (put 'with 'scheme-indent-function 1)
+     (put 'activity 'scheme-indent-function 1)
+     (put 'familiar-lambda 'scheme-indent-function 2)
+     (put 'foreign-lambda 'scheme-indent-function 2)
+     (put 'foreign-lambda* 'scheme-indent-function 2)
+     (put 'let-redis 'scheme-indent-function 1)
+     (put 'describe 'scheme-indent-function 1)
+     (put 'context 'scheme-indent-function 1)
+     (put 'define/let 'scheme-indent-function 1)
+     (put 'with-exclusive-transaction 'scheme-indent-function 1)))

File my/scpaste.el

+(require 'scpaste)
+(setq scpaste-scp-port "22")
+(setq scpaste-scp-destination "some-host:path")
+(setq scpaste-http-destination "http://some-host/path")
+
+;; implement optional htmlization
+(defun scpaste (original-name)
+  "Paste the current buffer via `scp' to `scpaste-http-destination'."
+  (interactive "MName (defaults to buffer name): ")
+  (let* ((html? (y-or-n-p "htmlize buffer? "))
+	 (b (if html? (htmlize-buffer) (current-buffer)))
+         (name (url-hexify-string (if (equal "" original-name)
+                                      (buffer-name)
+                                    original-name)))
+	 (full-url (concat scpaste-http-destination "/" name (if html? ".html" "")))
+         (scp-destination (concat scpaste-scp-destination "/" name (if html? ".html" "")))
+         (scp-original-destination (concat scpaste-scp-destination "/" name))
+         (tmp-file (concat temporary-file-directory "/" name)))
+
+    ;; Save the file (while adding footer)
+    (save-excursion
+      (when html?
+	(switch-to-buffer b)
+	(goto-char (point-min))
+	(search-forward "</body>\n</html>")
+	(insert (format scpaste-footer
+			(current-time-string)
+			(substring full-url 0 -5))))
+      (write-file tmp-file)
+      (when html?
+	(kill-buffer b)))
+
+    (shell-command (concat "scp -P " scpaste-scp-port
+                           " " tmp-file
+                           " " scp-destination))
+    (shell-command (concat "scp -P " scpaste-scp-port
+                           " " (buffer-file-name (current-buffer))
+                           " " scp-original-destination))
+
+    ;; Notify user and put the URL on the kill ring
+    (let ((x-select-enable-primary t))
+      (kill-new full-url))
+    (message "Pasted to %s (on kill ring)" full-url)))
+
+(define-key (current-global-map) (kbd "C-c C-p") 'scpaste)
+(define-key (current-global-map) (kbd "C-c C-c C-p") 'scpaste)
+(eval-after-load 'slime
+  '(let ((keys
+          '(("M-n"     . forward-paragraph)
+            ("M-p"     . backward-paragraph))))
+
+     (dolist (key keys)
+       (define-key slime-mode-map
+         (read-kbd-macro (car key))
+         (cdr key)))))

File my/smooth-scrolling.el

+(require 'smooth-scrolling)
+(setq custom-theme-directory "~/.emacs.d/themes")
+;; (load-theme 'wombat t  nil)
+;; (load-theme 'zenburn t  nil)
+(load-theme 'tango-dark)
+(add-to-list 'default-frame-alist
+             '(font . "Terminus-12"))

File themes/zenburn-theme.el

+;;; zenburn-theme.el --- Custom face theme for Emacs
+
+;; Copyright (C) 2010 cew.
+
+;; This file is free software: you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with GNU Emacs.  If not, see <http://www.gnu.org/licenses/>.
+
+;;; Code:
+
+(deftheme zenburn
+  "Copied over from Daniel Brockman's https://github.com/dbrock/zenburn-el; needs further customization.")
+
+(custom-theme-set-faces
+ 'zenburn
+ '(default ((t (:background "#3f3f3f" :foreground "#dcdccc"))))
+ '(cursor ((t (:background "#dcdccc" :foreground "#3f3f3f"))))
+ '(region ((t (:background "#233323" :foreground "#71d3b4"))))
+ '(mode-line ((t (:background "#1e2320" :foreground "#acbc90"))))
+ '(mode-line-inactive ((t (:background "#2e3330" :foreground "#88b090"))))
+ '(fringe ((t (:background "#464646"))))
+ '(minibuffer-prompt ((t (:foreground "#f0dfaf"))))
+ '(font-lock-builtin-face ((t (:foreground "#8cd0d3"))))
+ '(font-lock-comment-face ((t (:foreground "#7f9f7f"))))
+ '(font-lock-constant-face ((t (:foreground "#dca3a3" :weight bold))))
+ '(font-lock-function-name-face ((t (:foreground "#f0dfaf"))))
+ '(font-lock-keyword-face ((t (:foreground "#f0dfaf" :weight bold))))
+ '(font-lock-string-face ((t (:foreground "#cc9393"))))
+ '(font-lock-type-face ((t (:foreground "#dfdfbf" :weight bold))))
+ '(font-lock-variable-name-face ((t (:foreground "#f0dfaf"))))
+ '(font-lock-warning-face ((t (:background "#332323" :foreground "#e37170"))))
+ '(isearch ((t (:background "#506070" :foreground "#dcdccc"))))
+ '(lazy-highlight ((t (:background "#1e2320" :foreground "#dcdccc"))))
+ '(link ((t (:foreground "#f0dfaf" :underline t))))
+ '(link-visited ((t (:foreground "#8b008b" :underline t))))
+ '(button ((t (:underline t))))
+ '(header-line ((t (:background "#2e3330" :foreground "#88b090")))))
+
+(provide-theme 'zenburn)
+
+;; Local Variables:
+;; no-byte-compile: t
+;; End:
+
+;;; zenburn-theme.el  ends here