Juan Fuentes avatar Juan Fuentes committed 5acfa34

Moving from require to autoloads where possible.
Wrapped code inside `load-after` a macro wrapper of `eval-after-load`.

Comments (0)

Files changed (16)

site-lisp/c-conf.el

 ;;
 ;;; Code:
 
+
 (defun c-insert-include()
   (interactive)
   (insert "#include <.h>")
 (defun jj-c-hook()
   (autoload 'flymake "flymake" nil t)
   (c-set-style "linux")
-	(setq indent-tabs-mode t)
+  (setq indent-tabs-mode t)
   (setq tab-width '8)
   (setq fill-column 80)
   (setq comment-column 60)
   (setq-default turn-on-auto-fill t)
   (setq-default c-electric-pound-behavior (quote(alignleft))))
 
-
 (add-hook 'c-mode-common-hook 'hs-minor-mode)
 (add-hook 'c-mode-common-hook 'jj-c-hook)
 (add-hook 'c++mode-common-hook 'jj-c-hook)

site-lisp/elisp-conf.el

 (defun jj/emacs-lisp-mode-hook()
   (turn-on-eldoc-mode)
   (setq-default tab-width 2)
-  (setq-default indent-mode t)
   (abbrev-mode 1)
-  (auto-fill-mode 1)
   (local-set-key [return] 'newline-and-indent)
   (local-set-key [(control c) /] 'semantic-ia-complete-symbol)
   ;; Compile my .emacs file.
   (if (string-equal buffer-file-name (expand-file-name user-init-file))
       (add-hook 'after-save-hook 'compile-init-file t t)))
+
 (add-hook 'emacs-lisp-mode-hook (lambda () (elisp-slime-nav-mode t)))
 (add-hook 'emacs-lisp-mode-hook 'jj/emacs-lisp-mode-hook)
 (add-hook 'emacs-lisp-mode-hook #'enable-paredit-mode)
+(add-hook 'after-save-hook 'check-parens nil t)

site-lisp/eshell-conf.el

           (if (= (user-uid) 0)
               " # " " $ ")))
 
-(eval-after-load 'esh-opt
-  '(progn
-     (require 'em-prompt)
-     (require 'em-term)
-     (require 'em-cmpl)
-
-
-     ;; TODO: for some reason requiring this here breaks it, but
-     ;; requiring it after an eshell session is started works fine.
-     ;; (require 'eshell-vc)
-     (setenv "PAGER" "cat")
-     (set-face-attribute 'eshell-prompt nil :foreground "grey73")
-     (add-hook 'eshell-mode-hook 'jj/eshell-mode-hook)
-
-     (add-to-list 'eshell-visual-commands "ssh")
-     (add-to-list 'eshell-visual-commands "tail")
-     (add-to-list 'eshell-command-completions-alist
-                  '("gunzip" "gz\\'"))
-     (add-to-list 'eshell-command-completions-alist
-                  '("tar" "\\(\\.tar|\\.tgz\\|\\.tar\\.gz\\)\\'"))
-     (add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color)))
+(load-after 'esh-opt
+  (require 'em-prompt)
+  (require 'em-term)
+  (require 'em-cmpl)
+  
+  ;; TODO: for some reason requiring this here breaks it, but
+  ;; requiring it after an eshell session is started works fine.
+  ;; (require 'eshell-vc)
+  (setenv "PAGER" "cat")
+  (set-face-attribute 'eshell-prompt nil :foreground "grey73")
+  (add-hook 'eshell-mode-hook 'jj/eshell-mode-hook)
+  
+  (add-to-list 'eshell-visual-commands "ssh")
+  (add-to-list 'eshell-visual-commands "tail")
+  (add-to-list 'eshell-command-completions-alist
+	       '("gunzip" "gz\\'"))
+  (add-to-list 'eshell-command-completions-alist
+	       '("tar" "\\(\\.tar|\\.tgz\\|\\.tar\\.gz\\)\\'"))
+  (add-to-list 'eshell-output-filter-functions 'eshell-handle-ansi-color))
 
 (defun eshell/cds ()
   "Change directory to the project's root."

site-lisp/global.el

 
 ;; windmove
 (autoload 'windmove "windmove" nil t)
-(windmove-default-keybindings)
-(setq windmove-wrap-around t)
+(load-after "windmove"
+            (windmove-default-keybindings)
+            (setq windmove-wrap-around t))
 
 ;; expand-region
 (require 'expand-region nil t)
 
 ;; git support
 (add-to-list 'vc-handled-backends 'Git)
-
 (setq vc-follow-symlinks t)
+
 (setq change-log-default-name "ChangeLog"
       user-full-name "Juan Fuentes"
       user-mail-address "juan.j.fuentes@gmail.com"
     (require 'noweb-mode nil t))
 
 ;; etags
-(require 'etags-table nil t)
-(setq etags-table-search-up-depth 10)
+(autoload 'etags-table "etags-table")
+(load-after "etags-table"
+            (setq etags-table-search-up-depth 10))
 
 ;; Remove trailing whitespace
 (add-hook 'before-save-hook 'delete-trailing-whitespace)
 (setq save-place-limit 500)
 
 ;; winner mode
-(require 'winner nil t)
+(autoload 'winner "winner" nil t)
 (winner-mode)
 
 ;; sessions
        (setq browse-url-browser-function 'browse-url-w3)))
 
 ;; Multiple cursors
-(require 'multiple-cursors nil t)
+(when (locate-library "multiple-cursors")
+  (require 'multiple-cursors nil t))
+
+;; paredit
+(autoload 'enable-paredit-mode "paredit" t)
 
 ;; Electric pair mode
 (electric-pair-mode)
 (setq ispell-exta-args '("--sug-mode=ultra"))
 
 ;; Use completion
-(load "completion")
-(initialize-completions)
+;;(autoload 'completion "completion" nil t)
+;;(initialize-completions)
 
 ;;; Add the init-path tree to the Info path
 (require 'info nil t)
 (if (fboundp 'auto-image-file-mode)
     (auto-image-file-mode 1))
 
-(add-hook 'prog-mode-hook 'jj/pretty-lambdas)
+(when font-lock-mode
+  (add-hook 'prog-mode-hook 'jj/pretty-lambdas))
 (add-hook 'prog-mode-hook 'jj/local-comment-auto-fill)
 (add-hook 'prog-mode-hook 'jj/add-watchwords)
 (provide 'global)

site-lisp/go-conf.el

 
 (require 'go-mode-load nil t)
 
-;; compile and run go code.
-(defmacro jj:go(cmd)
-  `(lambda()
-     (interactive)
-     (compile (concat ,cmd (buffer-file-name)))))
-
-(defun jj/go-init-hook()
-  (setq-default tab-width 8)
-  (setq-default indent-tabs-mode t)
-  (local-set-key (kbd "C-c C-c") (jj:go "go build "))
-  (local-set-key (kbd "C-c C-e") (jj:go "go run "))
-  (add-hook 'before-save-hook 'gofmt-before-save))
-(add-hook 'go-mode-hook 'jj/go-init-hook)
+(load-after "go-mode-load"
+            ;; compile and run go code.
+            (defmacro jj:go(cmd)
+              `(lambda()
+                 (interactive)
+                 (compile (concat ,cmd (buffer-file-name)))))
+
+            (defun jj/go-init-hook()
+              (setq-default tab-width 8)
+              (setq-default indent-tabs-mode t)
+              (local-set-key (kbd "C-c C-c") (jj:go "go build "))
+              (local-set-key (kbd "C-c C-e") (jj:go "go run "))
+              (add-hook 'before-save-hook 'gofmt-before-save))
+            (add-hook 'go-mode-hook 'jj/go-init-hook))
 
 (provide 'go-conf)
 

site-lisp/ido-conf.el

 (ido-mode t)
 (when (locate-library "ido-ubiquitous")
   (ido-ubiquitous-mode))
-(setq ido-create-new-buffer 'always)
-(setq ido-enable-regexp t)
-(setq ido-completion-buffer-all-completions t)
-(setq ido-everywhere t)
-(setq ido-enable-flex-matching t)
-(setq ido-record-commands t)
+(load-after "ido-mode"
+            (setq ido-create-new-buffer 'always)
+            (setq ido-enable-regexp t)
+            (setq ido-completion-buffer-all-completions t)
+            (setq ido-everywhere t)
+            (setq ido-enable-flex-matching t)
+            (setq ido-record-commands t)
 
-(setq
- ido-case-fold t
- ido-enable-last-directory-history t
- ido-buffer-history t
- ido-max-work-directory-list 100
- ido-max-work-file-list 50
- ido-use-filename-at-point 'guess
- ido-use-url-at-point 'guess
- ido-max-prospects 7
- ido-enable-tramp-completion nil
- ido-confirm-unique-completion nil)
-(setq ido-file-extensions-order '(".org" ".el" ".go" ".c" ".sh" ".lisp" ".py" ".pl" ".json"))
+            (setq
+             ido-case-fold t
+             ido-enable-last-directory-history nil
+             ido-buffer-history t
+             ido-max-work-directory-list 100
+             ido-max-work-file-list 50
+             ido-use-filename-at-point 'guess
+             ido-use-url-at-point 'guess
+             ido-max-prospects 7
+             ido-enable-tramp-completion nil
+             ido-confirm-unique-completion nil)
+            (setq ido-file-extensions-order '(".org" ".el" ".go" ".c" ".sh" ".lisp" ".py" ".pl" ".json"))
 
-(add-hook 'ido-setup-hook
-					(lambda()
-						;; Go straight home
-						(define-key ido-file-completion-map
-							(kbd "~")
-							(lambda()
-								(interactive)
-								(if (looking-back "/")
-										(insert "~/")
-									(call-interactively 'self-insert-command))))))
+            (add-to-list 'ido-work-directory-list-ignore-regexps tramp-file-name-regexp)
+
+            (add-hook 'ido-setup-hook
+                      (lambda()
+                        ;; Go straight home
+                        (define-key ido-file-completion-map (kbd "~")
+                          (lambda()
+                            (interactive)
+                            (if (looking-back "/")
+                                (insert "~/")
+                                (call-interactively 'self-insert-command)))))))
 
 (provide 'ido-conf)
 

site-lisp/lisp-conf.el

 (defun jj/lisp-mode-hook()
   (setq-default tab-width 2)
   (abbrev-mode 1)
-  (auto-fill-mode 1)
   (local-set-key [return] 'newline-and-indent)
   (hs-minor-mode)
   (if (fboundp 'slime-mode)
 
 (add-hook 'lisp-mode-hook 'jj/lisp-mode-hook)
 (add-hook 'inferior-lisp-mode-hook 'jj/inferior-lisp-mode-hook)
-
+(add-hook 'after-save-hook 'check-parens nil t)
 (provide 'lisp-conf)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

site-lisp/monky-conf.el

   (defadvice monky-status (around monky-fullscreen activate)
     (window-configuration-to-register :monky-fullscreen)
     ad-do-it
-    (delete-other-windows)))
+    (delete-other-windows))
 
-	(eval-after-load 'monky-status
-		'(define-key monky-mode-map (kbd "q") 'monky-quit-session))
+  (eval-after-load 'monky-status
+                   '(define-key monky-mode-map (kbd "q") 'monky-quit-session)))
 
 (provide 'monky-conf)

site-lisp/nxml-conf.el

 
 (autoload 'nxml-mode "nxml-mode" nil t)
 ;; nxml autoload
-(add-to-list 'auto-mode-alist
-	     (cons (concat "\\." (regexp-opt '("xml" "xsd" "xt" "xd" "sch" "rng" "xslt" "svg" "rss") t) "\\'")
-		   'nxml-mode))
+(load-after "nxml-mode"
+            (add-to-list 'auto-mode-alist
+                         (cons
+                          (concat "\\." (regexp-opt '("xml" "xsd" "xt" "xd" "sch" "rng" "xslt" "svg" "rss") t) "\\'")
+                          'nxml-mode))
 
-(setq magic-mode-alist
-      (cons '("<\\?xml " . nxml-mode) magic-mode-alist))
+            (setq magic-mode-alist (cons '("<\\?xml " . nxml-mode) magic-mode-alist)))
 
 (provide 'nxml-conf)
 

site-lisp/org-conf.el

 ;;
 ;;; Code:
 
-(require 'org)
-
-(defun jj/org-mode-hook()
-  (auto-fill-mode 1)
-  (flyspell-mode 1)
-  (local-set-key "\C-ca" 'org-agenda))
-
-(add-hook 'org-mode-hook 'jj/org-mode-hook)
-
-(setq org-directory "~/.org")
-(setq org-default-notes-file (concat org-directory "/notes.org"))
-(setq org-mobile-directory "~/Dropbox/MobileOrg")
-(setq org-mobile-inbox-for-pull "~/Dropbox/MobileOrg/inbox.org")
-(setq org-mobile-force-id-on-agenda-items nil)
-(setq org-todo-keywords
-      '((type "TODO(t)" "STARTED(s)" "WAITING(w)" "APPT(a)" "PENDING(p)" "|"
-         "CANCELLED(c)" "DEFERRED(e)" "DONE(d)")
-        (sequence "PROJECT(j)" "|" "FINISHED(f)")
-        (sequence "INVOICE(i)" "SENT(n)" "|" "RCVD(r)")))
-
-(setq org-level-color-stars-only nil)
-(setq org-fontify-emphasized-text t)
-(setq org-hide-leading-stars t)
-(setq org-completion-use-ido t)
-(setq org-log-done 'time)
-(setq org-agenda-start-on-weekday 1)
-(setq org-agenda-ndays 7)
-
-(setq org-fontify-done-headline t)
-(custom-set-faces
- '(org-done
-   ((t (:foreground "PaleGreen" :weight normal :strike-through t))))
- '(org-headline-done
-   ((((class color) (min-colors 16) (background dark))
-     (:foreground "LightSalmon" :strike-through t)))))
-
-(setq org-agenda-files '("~/.org/personal.org"
-                         "~/.org/work.org"))
-
-;; org-capture
-(define-key global-map "\C-cr" 'org-capture)
-(setq org-capture-templates
-      `(("t" "Tasks" entry (file+headline "~/.org/work.org" "Tasks") "* TODO %^{Task}    %^g\nSCHEDULED: %^t %? \n")
-        ("f" "Future Todo" entry (file+headline "~/.org/future-work.org" "Inbox") "* TODO %?\n %i\n %^T\n %a" :prepend t)
-        ("j" "Journal" entry (file "~/.org/journal.org") "* %u %?\n\n" :prepend t)
-        ("i" "Idea" entry (file+headline "~/.org/notes.org" "New Ideas") "* %^{Title}\n %i\n %a" :prepend t)
-        ("w" "Website" entry (file "~/.org/blog/xmonk.org") "* %U %?\n\n %i\n %a")
-        ("x" "org-capture" entry (file+headline "~/.org/archive/www.org" "Archived Content") "* %^{Title}p: %:description\n\n Source: %U %c\n\n %i")))
-
-
-;; org-babel configuration based on emacs-starter-kit-org.org
-
-;; Set default header arguments for the Org-mode blocks used to
-;; showcase example Org-mode syntax.
-(setq org-babel-default-header-args:org '((:results . "raw silent")
-                                          (:exports . "code")))
-
-(setq org-babel-default-header-args:python '((:exports . "code")
-                                             (:tangle  . "yes")))
-
-;; load languages.
-(org-babel-do-load-languages
- 'org-babel-load-languages
- '((org . t)
-   (python . t)
-   (perl . t)
-   (ruby . t)
-   (lisp . t)
-   (sh . t)
-   (C . t)
-   (emacs-lisp . t)
-   (sqlite . t)))
-
-;; The following displays the contents of code blocks in Org-mode files
-;; using the major-mode of the code.  It also changes the behavior of
-;; =TAB= to as if it were used in the appropriate major mode.
-
-(setq org-src-fontify-natively t)
-(setq org-src-tab-acts-natively t)
-
-;; add a few more keywords to org easy template
-
-(setq org-structure-template-alist
-      (append '(("sc" "#+name: ?\n#+begin_src  :exports code :tangle yes\n\n#+end_src")
-                ("py" "#+name: ?\n#+begin_src python\n\n#+end_src")
-                ("nref" "#+name: ?\n#+begin_src :noweb-ref <name> :tangle no\n\n#+end_src")
-                ("ntan" "#+name: ?\n#+begin_src :noweb tangle :tangle yes\n\n#+end_src"))))
-
-(require 'org-crypt nil t)
-; Encrypt all entries before saving
-(org-crypt-use-before-save-magic)
-(setq org-tags-exclude-from-inheritance (quote ("crypt")))
-(setq org-crypt-disable-auto-save nil)
-
-;; org2blog
-
-(setq org2blog/wp-blog-alist
-       '(("xmonk"
-          :url "http://xmonk.org/xmlrpc.php"
-          :username "xmonk")))
+(autoload 'org "org" nil t)
+
+(load-after "org"
+            (defun jj/org-mode-hook()
+              (auto-fill-mode 1)
+              (flyspell-mode 1)
+              (local-set-key "\C-ca" 'org-agenda))
+
+            (add-hook 'org-mode-hook 'jj/org-mode-hook)
+
+            (setq org-directory "~/.org")
+            (setq org-default-notes-file (concat org-directory "/notes.org"))
+            (setq org-mobile-directory "~/Dropbox/MobileOrg")
+            (setq org-mobile-inbox-for-pull "~/Dropbox/MobileOrg/inbox.org")
+            (setq org-mobile-force-id-on-agenda-items nil)
+            (setq org-todo-keywords
+                  '((type "TODO(t)" "STARTED(s)" "WAITING(w)" "APPT(a)" "PENDING(p)" "|"
+                     "CANCELLED(c)" "DEFERRED(e)" "DONE(d)")
+                    (sequence "PROJECT(j)" "|" "FINISHED(f)")
+                    (sequence "INVOICE(i)" "SENT(n)" "|" "RCVD(r)")))
+
+            (setq org-level-color-stars-only nil)
+            (setq org-fontify-emphasized-text t)
+            (setq org-hide-leading-stars t)
+            (setq org-completion-use-ido t)
+            (setq org-log-done 'time)
+            (setq org-agenda-start-on-weekday 1)
+            (setq org-agenda-ndays 7)
+
+            (setq org-fontify-done-headline t)
+            (custom-set-faces
+             '(org-done
+               ((t (:foreground "PaleGreen" :weight normal :strike-through t))))
+             '(org-headline-done
+               ((((class color) (min-colors 16) (background dark))
+                 (:foreground "LightSalmon" :strike-through t)))))
+
+            (setq org-agenda-files '("~/.org/personal.org"
+                                     "~/.org/work.org"))
+
+            ;; org-capture
+            (define-key global-map "\C-cr" 'org-capture)
+            (setq org-capture-templates
+                  `(("t" "Tasks" entry (file+headline "~/.org/work.org" "Tasks") "* TODO %^{Task}    %^g\nSCHEDULED: %^t %? \n")
+                    ("f" "Future Todo" entry (file+headline "~/.org/future-work.org" "Inbox") "* TODO %?\n %i\n %^T\n %a" :prepend t)
+                    ("j" "Journal" entry (file "~/.org/journal.org") "* %u %?\n\n" :prepend t)
+                    ("i" "Idea" entry (file+headline "~/.org/notes.org" "New Ideas") "* %^{Title}\n %i\n %a" :prepend t)
+                    ("w" "Website" entry (file "~/.org/blog/xmonk.org") "* %U %?\n\n %i\n %a")
+                    ("x" "org-capture" entry (file+headline "~/.org/archive/www.org" "Archived Content") "* %^{Title}p: %:description\n\n Source: %U %c\n\n %i")))
+
+
+            ;; org-babel configuration based on emacs-starter-kit-org.org
+
+            ;; Set default header arguments for the Org-mode blocks used to
+            ;; showcase example Org-mode syntax.
+            (setq org-babel-default-header-args:org '((:results . "raw silent")
+                                                      (:exports . "code")))
+
+            (setq org-babel-default-header-args:python '((:exports . "code")
+                                                         (:tangle  . "yes")))
+
+            ;; load languages.
+            (org-babel-do-load-languages
+             'org-babel-load-languages
+             '((org . t)
+               (python . t)
+               (perl . t)
+               (ruby . t)
+               (lisp . t)
+               (sh . t)
+               (C . t)
+               (emacs-lisp . t)
+               (sqlite . t)))
+
+            ;; The following displays the contents of code blocks in Org-mode files
+            ;; using the major-mode of the code.  It also changes the behavior of
+            ;; =TAB= to as if it were used in the appropriate major mode.
+
+            (setq org-src-fontify-natively t)
+            (setq org-src-tab-acts-natively t)
+
+            ;; add a few more keywords to org easy template
+
+            (setq org-structure-template-alist
+                  (append '(("sc" "#+name: ?\n#+begin_src  :exports code :tangle yes\n\n#+end_src")
+                            ("py" "#+name: ?\n#+begin_src python\n\n#+end_src")
+                            ("nref" "#+name: ?\n#+begin_src :noweb-ref <name> :tangle no\n\n#+end_src")
+                            ("ntan" "#+name: ?\n#+begin_src :noweb tangle :tangle yes\n\n#+end_src"))))
+
+            (require 'org-crypt nil t)
+                                        ; Encrypt all entries before saving
+            (org-crypt-use-before-save-magic)
+            (setq org-tags-exclude-from-inheritance (quote ("crypt")))
+            (setq org-crypt-disable-auto-save nil)
+
+            ;; org2blog
+
+            (setq org2blog/wp-blog-alist
+                  '(("xmonk"
+                     :url "http://xmonk.org/xmlrpc.php"
+                     :username "xmonk")))
 
 ;;; Usefull functions for org-mode.
 ;;; Taken from irreal.org. Thanks to jcs from  http://irreal.org/blog
 
-(defun jj/find-org-markers(regexp)
-  (occur regexp)
-  (pop-to-buffer "*Occur*"))
-
-(defun jj/find-top-org-headers()
-  (interactive)
-  (jj/find-org-markers "^\\*[^*]"))
-
-(defun jj/find-all-org-headers()
-  (interactive)
-  (jj/find-org-markers "^\\*+"))
-
-(defun jj/find-org-links()
-  (interactive)
-  (jj/find-org-markers "\\[\\["))
-
-(defun jj/find-an-org-header(term)
-  (interactive "sSearch Term: ")
-  (jj/find-org-markers(concat "^\\*+ .*" term)))
-
-(defun jj/header-org-mode()
-  "Insert header at the top of org file"
-  (interactive)
-  (save-excursion
-    (goto-char (point-min))
-    (insert "#+TITLE: " (file-name-nondirectory
-                         (file-name-sans-extension(buffer-file-name))) "\n")
-    (insert "#+AUTHOR: " (user-full-name) "\n\n")))
-
-(defun jj/new-org()
-  (interactive)
-  (let ((name (concat "~/Dropbox/misc/org-files/" (read-string "New org file: " "tmp.org"))))
-    (find-file "~/Dropbx/misc/org-files/_template.org")
-    (write-file name)))
-
-
-;; Sort todo-list
-(defun jj/org-sort-todo-list()
-  "Sort buffer in todo order."
-  (interactive)
-  (save-excursion
-    (mark-whole-buffer)
-    (org-sort-entries nil ?o))
-  (org-overview))
-
-(setq org-refile-use-outline-path "Finished")
-
-(defun jj/org-refile-done()
-  (interactive)
-  (beginning-of-buffer)
-  (re-search-forward "DONE")
-  (if (match-beginning 0)
-      (let ((org-refile-targets '((nil :maxlevel . 5))))
-        (org-refile nil (current-buffer)))))
+            (defun jj/find-org-markers(regexp)
+              (occur regexp)
+              (pop-to-buffer "*Occur*"))
+
+            (defun jj/find-top-org-headers()
+              (interactive)
+              (jj/find-org-markers "^\\*[^*]"))
+
+            (defun jj/find-all-org-headers()
+              (interactive)
+              (jj/find-org-markers "^\\*+"))
+
+            (defun jj/find-org-links()
+              (interactive)
+              (jj/find-org-markers "\\[\\["))
+
+            (defun jj/find-an-org-header(term)
+              (interactive "sSearch Term: ")
+              (jj/find-org-markers(concat "^\\*+ .*" term)))
+
+            (defun jj/header-org-mode()
+              "Insert header at the top of org file"
+              (interactive)
+              (save-excursion
+               (goto-char (point-min))
+               (insert "#+TITLE: " (file-name-nondirectory
+                                    (file-name-sans-extension(buffer-file-name))) "\n")
+               (insert "#+AUTHOR: " (user-full-name) "\n\n")))
+
+            (defun jj/new-org()
+              (interactive)
+              (let ((name (concat "~/Dropbox/misc/org-files/" (read-string "New org file: " "tmp.org"))))
+                (find-file "~/Dropbx/misc/org-files/_template.org")
+                (write-file name)))
+
+            ;; Sort todo-list
+            (defun jj/org-sort-todo-list()
+              "Sort buffer in todo order."
+              (interactive)
+              (save-excursion
+               (mark-whole-buffer)
+               (org-sort-entries nil ?o))
+              (org-overview))
+
+            (setq org-refile-use-outline-path "Finished")
+
+            (defun jj/org-refile-done()
+              (interactive)
+              (beginning-of-buffer)
+              (re-search-forward "DONE")
+              (if (match-beginning 0)
+                  (let ((org-refile-targets '((nil :maxlevel . 5))))
+                    (org-refile nil (current-buffer))))))
 
 (provide 'org-conf)
 

site-lisp/pkg-conf.el

-(require 'package nil t)
+(autoload 'package "package" nil t)
 
-;; ("marmalade" . "http://marmalade-repo.org/packages/")
-;; ("ELPA" . "http://tromey.com/elpa/")
+(load-after "package"
+            (setq package-archives
+                  '(("gnu"   . "http://elpa.gnu.org/packages/")
+                    ("melpa" . "http://melpa.milkbox.net/packages/")
+                    ("marmalade" . "http://marmalade-repo.org/packages/")))
 
-(setq package-archives
-	     '(("gnu"   . "http://elpa.gnu.org/packages/")
-	       ("melpa" . "http://melpa.milkbox.net/packages/")
-         ("marmalade" . "http://marmalade-repo.org/packages/")))
+            (package-initialize)
 
-(package-initialize)
+            (when (not package-archive-contents)
+              (package-refresh-contents))
 
-(when (not package-archive-contents)
-  (package-refresh-contents))
+            (defvar my-packages
+              '(paredit magit monky ido-ubiquitous elisp-slime-nav
+                flymake-python-pyflakes flymake-cursor
+                auto-complete concurrent ctable jedi epc
+                multiple-cursors undo-tree solarized-theme
+                redo+ ace-jump-mode websocket browse-kill-ring
+                find-file-in-project expand-region)
+              "A list of packages that should be installed at launch")
 
-(defvar my-packages
-  '(paredit magit monky ido-ubiquitous elisp-slime-nav
-            flymake-python-pyflakes flymake-cursor
-            auto-complete concurrent ctable jedi epc
-            multiple-cursors undo-tree solarized-theme
-            redo+ ace-jump-mode websocket browse-kill-ring
-            find-file-in-project expand-region)
-  "A list of packages that should be installed at launch")
-
-(dolist (p my-packages)
-  (when (not (package-installed-p p))
-    (package-install p)))
+            (dolist (p my-packages)
+              (when (not (package-installed-p p))
+                (package-install p))))
 
 (provide 'pkg-conf)

site-lisp/pl-conf.el

 
 ;; Always use cperl-mode.
 (defalias 'perl-mode 'cperl-mode)
-
-(defun cperl-mode-tweaks ()
-	(setq cperl-continued-brace-offset -4
-				cperl-label-offset -4 cperl-invalid-face nil
-				cperl-electric-keywords t cperl-indent-level 4
-				perl-hairy t)
-	(autoload 'flymake "flymake" nil t)
-	(auto-fill-mode t)
-	(cperl-set-style "PerlStyle"))
-
-(add-hook 'cperl-mode-hook 'cperl-mode-tweaks)
-(add-hook 'cperl-mode-hook 'hs-minor-mode)
-
-;; This is a way to hook tempo into cperl-mode
-(defvar pl-tempo-tags nil
-  "Tempo tags for Perl mode")
+(load-after "cperl-mode"
+						(defun cperl-mode-tweaks ()
+							(setq cperl-continued-brace-offset -4
+										cperl-label-offset -4 cperl-invalid-face nil
+										cperl-electric-keywords t cperl-indent-level 4
+										perl-hairy t)
+							(autoload 'flymake "flymake" nil t)
+							(auto-fill-mode t)
+							(cperl-set-style "PerlStyle"))
+
+						(add-hook 'cperl-mode-hook 'cperl-mode-tweaks)
+						(add-hook 'cperl-mode-hook 'hs-minor-mode)
+
+						;; This is a way to hook tempo into cperl-mode
+						(defvar pl-tempo-tags nil
+							"Tempo tags for Perl mode")
 
 ;;; Perl-Mode Templates
-(require 'tempo "tempo" t)
+						(require 'tempo "tempo" t)
 
-(setq tempo-interactive t)
+						(setq tempo-interactive t)
 
-(defun jj/cperl-mode-hook ()
-  (local-set-key (kbd "C-h f") 'cperl-perldoc)
-  (local-set-key [f11] 'tempo-complete-tag)
-  (tempo-use-tag-list 'pl-tempo-tags))
+						(defun jj/cperl-mode-hook ()
+							(local-set-key (kbd "C-h f") 'cperl-perldoc)
+							(local-set-key [f11] 'tempo-complete-tag)
+							(tempo-use-tag-list 'pl-tempo-tags))
 
-(add-hook 'cperl-mode-hook 'jj/cperl-mode-hook)
+						(add-hook 'cperl-mode-hook 'jj/cperl-mode-hook)
 
 ;;; Preprocessor Templates (appended to perl-tempo-tags)
-(tempo-define-template "pl-strict"
-                       '("use " r ";" > n)
-                       "use"
-                       "Insert a use statement"
-                       'pl-tempo-tags)
+						(tempo-define-template "pl-strict"
+																	 '("use " r ";" > n)
+																	 "use"
+																	 "Insert a use statement"
+																	 'pl-tempo-tags)
 
 ;;; Perl-Mode Templates
 
-(tempo-define-template "pl-if"
-                       '(> "if (" (p "if-clause: " clause) ") {" > n>
-                         > r n
-                         "}" > n>
-                         )
-                       "if"
-                       "Insert a perl if statement"
-                       'pl-tempo-tags)
-
-(tempo-define-template "pl-else"
-                       '(> "else" " {" > n>
-                         > r n
-                         "}" > n>
-                         )
-                       "else"
-                       "Insert a perl else statement"
-                       'pl-tempo-tags)
-
-(tempo-define-template "c-if-else"
-                       '(> "if (" (p "if-clause: " clause) ") {" > n
-                         > r n
-                         "} else {" > n>
-                         > r n
-                         "}" > n>
-                         )
-                       "ifelse"
-                       "Insert a perl if else statement"
-                       'pl-tempo-tags)
-
-(tempo-define-template "c-while"
-                       '(> "while (" (p "while-clause: " clause) ") {" > n
-                         > r n
-                         "}" > n>
-                         )
-                       "while"
-                       "Insert a perl while statement"
-                       'pl-tempo-tags)
-
-(tempo-define-template "pl-foreach"
-                       '(> "foreach " (p "variable: " var) "(" (p "foreach-clause: " clause) ") {" > n
-                         > r n
-                         "}" > n>
-                         )
-                       "foreach"
-                       "Insert a perl foreach statement"
-                       'pl-tempo-tags)
-
-(tempo-define-template "pl-for-i"
-                       '(> "for (" (p "variable: " var) " = 0; " (s var)
-                         " < "(p "upper bound: " ub)"; " (s var) "++) {" > n
-                         > r n
-                         "}" > n>
-                         )
-                       "fori"
-                       "Insert a perl for loop: for(x = 0; x < ..; x++)"
-                       'pl-tempo-tags)
+						(tempo-define-template "pl-if"
+																	 '(> "if (" (p "if-clause: " clause) ") {" > n>
+																		 > r n
+																		 "}" > n>
+																		 )
+																	 "if"
+																	 "Insert a perl if statement"
+																	 'pl-tempo-tags)
+
+						(tempo-define-template "pl-else"
+																	 '(> "else" " {" > n>
+																		 > r n
+																		 "}" > n>
+																		 )
+																	 "else"
+																	 "Insert a perl else statement"
+																	 'pl-tempo-tags)
+
+						(tempo-define-template "c-if-else"
+																	 '(> "if (" (p "if-clause: " clause) ") {" > n
+																		 > r n
+																		 "} else {" > n>
+																		 > r n
+																		 "}" > n>
+																		 )
+																	 "ifelse"
+																	 "Insert a perl if else statement"
+																	 'pl-tempo-tags)
+
+						(tempo-define-template "c-while"
+																	 '(> "while (" (p "while-clause: " clause) ") {" > n
+																		 > r n
+																		 "}" > n>
+																		 )
+																	 "while"
+																	 "Insert a perl while statement"
+																	 'pl-tempo-tags)
+
+						(tempo-define-template "pl-foreach"
+																	 '(> "foreach " (p "variable: " var) "(" (p "foreach-clause: " clause) ") {" > n
+																		 > r n
+																		 "}" > n>
+																		 )
+																	 "foreach"
+																	 "Insert a perl foreach statement"
+																	 'pl-tempo-tags)
+
+						(tempo-define-template "pl-for-i"
+																	 '(> "for (" (p "variable: " var) " = 0; " (s var)
+																		 " < "(p "upper bound: " ub)"; " (s var) "++) {" > n
+																		 > r n
+																		 "}" > n>
+																		 )
+																	 "fori"
+																	 "Insert a perl for loop: for(x = 0; x < ..; x++)"
+																	 'pl-tempo-tags))
 
 (provide 'pl-conf)
 

site-lisp/py-conf.el

 
 ;; Package-Requires: ((jedi) (flymake-python-pyflakes) (flymake-cursor))
 
-(when (executable-find "linters")
-  (setq python-check-command "linters"))
-
-(autoload 'doctest-mode "doctest-mode" "Python doctest editing mode." t)
-
-(setq-default tab-width '4)
-(setq-default indent-tabs-mode nil)
-(setq python-indent-offset 4)
-(setq python-shell-interpreter "ipython")
-(setq python-shell-interpreter-args "")
-(setq python-shell-prompt-regexp "In \\[[0-9]+\\]: ")
-(setq python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: ")
-(setq python-shell-completion-setup-code "from IPython.core.completerlib import module_completion")
-(setq python-shell-completion-module-string-code "';'.join(module_completion('''%s'''))\n")
-(setq python-shell-completion-string-code "';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
-
-(setq interpreter-mode-alist
-      (cons '("python" . python-mode) interpreter-mode-alist))
-
-(when (executable-find "pyflakes")
-  ;; On-the-fly syntax checking via flymake
-  (load "flymake-cursor")
-  (eval-after-load 'python
-                   '(require 'flymake-python-pyflakes)))
-
-(add-hook 'python-mode-hook 'flymake-python-pyflakes-load)
-
-(when (locate-library "jedi")
-  (add-hook 'python-mode-hook 'auto-complete-mode)
-  (add-hook 'python-mode-hook 'jedi:setup)
-  (add-hook 'python-mode-hook 'jedi:ac-setup)
-  (eval-after-load 'jedi
-                   (setq jedi:setup-keys t)))
-
-(require 'python nil t)
-
-;; (defun python--add-debug-highlight()
-;;   "Adds a highlighter for use by `python--pdb-breakpoint-string'"
-;;   (highlight-lines-matching-regexp "## DEBUG ##\\s-*$" 'hi-red-b))
-
-;; (add-hook 'python-mode-hook 'python--add-debug-highlight)
-
-;; (defvar python--ipdb-breakpoint-string "import ipdb; ipdb.set_trace() ## DEBUG ##"
-;;   "Python breakpoint string used by `python-insert-breakpoint'")
-
-;; (defun python-insert-breakpoint()
-;;   "Inserts a python breakpoint using `ipdb'"
-;;   (interactive)
-;;   (back-to-indentation)
-;;   ;; this preserves the correct indentation in case the line above
-;;   ;; point is a nested block
-;;   (split-line)
-;;   (insert python--ipdb-breakpoint-string))
-;; (define-key python-mode-map (kbd "<f5>") 'python-insert-breakpoint)
+(load-after "python"
+            (when (executable-find "linters")
+              (setq python-check-command "linters"))
+
+            (autoload 'doctest-mode "doctest-mode" "Python doctest editing mode." t)
+
+            (setq-default tab-width '4)
+            (setq-default indent-tabs-mode nil)
+            (setq python-indent-offset 4)
+            (setq python-shell-interpreter "ipython")
+            (setq python-shell-interpreter-args "")
+            (setq python-shell-prompt-regexp "In \\[[0-9]+\\]: ")
+            (setq python-shell-prompt-output-regexp "Out\\[[0-9]+\\]: ")
+            (setq python-shell-completion-setup-code "from IPython.core.completerlib import module_completion")
+            (setq python-shell-completion-module-string-code "';'.join(module_completion('''%s'''))\n")
+            (setq python-shell-completion-string-code "';'.join(get_ipython().Completer.all_completions('''%s'''))\n")
+
+            (setq interpreter-mode-alist
+                  (cons '("python" . python-mode) interpreter-mode-alist))
+
+            (when (executable-find "pyflakes")
+              ;; On-the-fly syntax checking via flymake
+              (require 'flymake-cursor nil t)
+              (require 'flymake-python-pyflakes nil t)
+              ;; (eval-after-load 'python
+              ;;                  '(require 'flymake-python-pyflakes)))
+
+              (add-hook 'python-mode-hook 'flymake-python-pyflakes-load)
+
+              (when (locate-library "jedi")
+                (add-hook 'python-mode-hook 'auto-complete-mode)
+                (add-hook 'python-mode-hook 'jedi:setup)
+                (add-hook 'python-mode-hook 'jedi:ac-setup)
+                ;; (eval-after-load 'jedi
+                ;;                  (setq jedi:setup-keys t)))
+                (load-after 'jedi
+                            (setq jedi:setup-keys t)))
+
+
+              (defun python--add-debug-highlight()
+                "Adds a highlighter for use by `python--pdb-breakpoint-string'"
+                (highlight-lines-matching-regexp "## DEBUG ##\\s-*$" 'hi-red-b))
+
+              (add-hook 'python-mode-hook 'python--add-debug-highlight)
+
+              (defvar python--ipdb-breakpoint-string "import ipdb; ipdb.set_trace() ## DEBUG ##"
+                "Python breakpoint string used by `python-insert-breakpoint'")
+
+              (defun python-insert-breakpoint()
+                "Inserts a python breakpoint using `ipdb'"
+                (interactive)
+                (back-to-indentation)
+                ;; this preserves the correct indentation in case the line above
+                ;; point is a nested block
+                (split-line)
+                (insert python--ipdb-breakpoint-string))
+              (define-key python-mode-map (kbd "<f5>") 'python-insert-breakpoint)))
 
 ;; (defadvice compile(before ad-compile-smart activate)
 ;;   "Advises `compile' so it sets the argument COMINT to t
-;; if breakpoints are present in `python-mode' files"
+;;    if breakpoints are present in `python-mode' files"
 ;;   (when (derived-mode-p major-mode 'python-mode)
 ;;     (save-excursion
 ;;      (save-match-data
-;;       (goto-char (int-min))
+;;       (goto-char (point-min))
 ;;       (if (re-search-forward (concat "^\\s-*" python--pdb-breakpoint-string "$")
 ;;                              (point-max) t)
 ;;           ;; set COMINT argument to `t'.
-;;           (ad-set-arg 1 t))))))
+;;           (ad-set-arg 1 t))
+;; 			(ad-set-arg 1 nil)))))
 
 (provide 'py-conf)
 

site-lisp/sh-conf.el

 ;;
 ;;; Code:
 
-(defun jj/sh-hook()
-  (setq-default sh-basic-offset '4)
-  (setq-default	sh-indentation '4)
-  (setq-default sh-indent-comment t)
-  (setq-default indent-tabs-mode t)
-  (setq sh-indent-for-case-label '0)
-  (setq sh-indent-for-case-alt '+))
+(load-after "sh-mode"
+						(defun jj/sh-hook()
+							(setq-default sh-basic-offset '4)
+							(setq-default	sh-indentation '4)
+							(setq-default sh-indent-comment t)
+							(setq-default indent-tabs-mode t)
+							(setq sh-indent-for-case-label '0)
+							(setq sh-indent-for-case-alt '+))
 
-(add-hook 'sh-mode-hook 'jj/sh-hook)
+						(add-hook 'sh-mode-hook 'jj/sh-hook))
 
 (provide 'sh-conf)
 

site-lisp/slime-conf.el

 ;;; Code:
 
 (require 'inf-lisp nil t)
-(require 'slime nil t)
-
-(setq inferior-lisp-program "sbcl")
-
+(require 'slime-autoloads nil t)
 (slime-setup)
 
-(add-to-list 'slime-lisp-implementations '(sbcl ("sbcl")  :coding-system utf-8-unix))
-
-(setq slime-use-autodoc-mode nil)
-(eval-after-load "slime"
-  '(progn
-     (slime-setup '(slime-fancy slime-indentation slime-asdf slime-banner
-		    slime-fuzzy slime-repl))
-     (setq slime-complete-symbol*-fancy t)
-     (setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
-     (setq slime-repl-history-remove-duplicates t)
-     (setq slime-repl-history-trim-whitespaces t)
-     (setq slime-protocol-version 'ignore))) ;; ignore version mismatch
-
-(setq common-lisp-hyperspec-root
-      (concat "file:///" (concat (getenv "HOME") "/Dropbox/HyperSpec/")))
-
-(setq lisp-lambda-list-keyword-parameter-alignment t
-      lisp-lambda-list-keyword-alignment t
-      lisp-indent-function 'common-lisp-indent-function
-      slime-complete-symbol-function 'slime-fuzzy-complete-symbol
-      slime-startup-animation nil
-      slime-enable-evaluate-in-emacs t
-      slime-log-events t
-      slime-outline-mode-in-events-buffer nil
-      slime-repl-return-behaviour :send-only-if-after-complete
-      slime-autodoc-use-multiline-p t
-      slime-highlight-compiler-notes t
-      slime-fuzzy-completion-in-place nil)
-
-(require 'paredit nil t)
-
-(define-key slime-mode-map (kbd "(") 'paredit-open-parenthesis)
-(define-key slime-mode-map (kbd ")") 'paredit-close-parenthesis)
-(define-key slime-mode-map (kbd "\"") 'paredit-doublequote)
-(define-key slime-mode-map (kbd "\\") 'paredit-backslash)
-(define-key slime-mode-map (kbd "RET") 'paredit-newline)
-(define-key slime-mode-map (kbd "<return>") 'paredit-newline)
-(define-key slime-mode-map (kbd "C-j") 'newline)
-(define-key slime-mode-map (kbd "C-h") 'backward-sexp)
-(define-key slime-mode-map (kbd "C-t") 'transpose-sexps)
-(define-key slime-mode-map (kbd "C-M-t") 'transpose-chars)
-(define-key slime-mode-map (kbd "C-n") 'forward-sexp)
-(define-key slime-mode-map (kbd "C-k") 'kill-sexp)
-(define-key slime-mode-map (kbd "C-M-k") 'paredit-kill)
-(define-key slime-mode-map (kbd "C-'") 'paredit-splice-sexp)
-(define-key slime-mode-map (kbd "C-M-l") 'paredit-recentre-on-sexp)
-(define-key slime-mode-map (kbd "C-.") 'paredit-forward-slurp-sexp)
-(define-key slime-mode-map (kbd "C-<") 'paredit-backward-barf-sexp)
-(define-key slime-mode-map (kbd "C->") 'paredit-forward-barf-sexp)
-(define-key slime-mode-map (kbd "C-/") 'backward-up-list)
-(define-key slime-mode-map (kbd "C-=") 'down-list)
-(define-key slime-mode-map (kbd "TAB") 'slime-indent-and-complete-symbol)
-(define-key slime-mode-map (kbd "C-c TAB") 'slime-complete-form)
-(define-key slime-mode-map (kbd "C-c C-z") 'slime-switch-to-output-buffer)
-(define-key slime-mode-map (kbd "C-c C-i") 'slime-inspect)
-(define-key global-map (kbd "<f12>") 'slime-selector)
-
-(setq slime-save-buffers nil)
-
-(defvar slime-auto-compile-timer nil)
-
-(defun slime-enable-auto-compile ()
-  (setf slime-auto-compile-timer
-	(run-with-idle-timer 3 t `(lambda ()
-				    (when (and slime-mode
-					       (slime-sexp-at-point)
-					       (slime-connected-p))
-				      (slime-compile-defun))))))
-
-(defun slime-disable-auto-compile ()
-  (cancel-timer slime-auto-compile-timer))
-
-(setf slime-display-edit-hilights t) ;; was nil
-
-(defun slime-repl-clear-buffer ()
-  "Delete the entire output generated by the Lisp process."
-  (interactive)
-  ;; need to add this since we narrow the region...
-  (widen)
-  (slime-eval-async `(swank:clear-repl-results))
-  (set-marker slime-repl-last-input-start-mark nil)
-  (let ((inhibit-read-only t))
-    (delete-region (point-min) (slime-repl-input-line-beginning-position))
-    (goto-char slime-repl-input-start-mark)))
-
-
-(define-skeleton jj/cl-defpackage-skeleton
-  "Insert a Common Lisp DEFPACKAGE skeleton"
-  (skeleton-read "Package: " (if v1
-				 (file-name-sans-extension
-				  (file-name-nondirectory
-				   (buffer-file-name)))))
-  (if (setq v1 (bobp)) ";;; -*- Mode: Lisp; Syntax:ANSI-Common-Lisp;")
-  & (if buffer-file-coding-system
-	(concat " Coding:"
-		(symbol-name
-		 (coding-system-get buffer-file-coding-system
-				    'mime-charset))))
-  & " -*_"
-  & \n
-  & \n "(defpackage #:" str
-  \n "(:nicknames" ("Nickname: " " #:" str) & ")" | '(kill-whole-line -1)
-  \n "(:use $:CL" ((slime-read-package-name "USED package: ") " #:" str) ")"
-  "}" \n
-  \n
-  (if v1 "(in-package #:") & str & ")" & \n &
-  \n
-  _)
-
-(add-hook 'slime-mode-hook
-	  (lambda()
-	    (unless (slime-connected-p)
-	      (save-excursion (slime)))))
+(load-after "slime"
+						(setq inferior-lisp-program "sbcl")
+						(add-to-list 'slime-lisp-implementations '(sbcl ("sbcl")  :coding-system utf-8-unix))
+						(setq slime-use-autodoc-mode nil)
+
+						(slime-setup '(slime-fancy slime-indentation slime-asdf slime-banner
+													 slime-fuzzy slime-repl))
+						(setq slime-complete-symbol*-fancy t)
+						(setq slime-complete-symbol-function 'slime-fuzzy-complete-symbol)
+						(setq slime-repl-history-remove-duplicates t)
+						(setq slime-repl-history-trim-whitespaces t)
+						(setq slime-protocol-version 'ignore) ;; ignore version mismatch
+
+						(setq common-lisp-hyperspec-root
+									(concat "file:///" (concat (getenv "HOME") "/Dropbox/HyperSpec/")))
+
+						(setq lisp-lambda-list-keyword-parameter-alignment t
+									lisp-lambda-list-keyword-alignment t
+									lisp-indent-function 'common-lisp-indent-function
+									slime-complete-symbol-function 'slime-fuzzy-complete-symbol
+									slime-startup-animation nil
+									slime-enable-evaluate-in-emacs t
+									slime-log-events t
+									slime-outline-mode-in-events-buffer nil
+									slime-repl-return-behaviour :send-only-if-after-complete
+									slime-autodoc-use-multiline-p t
+									slime-highlight-compiler-notes t
+									slime-fuzzy-completion-in-place nil)
+
+						(add-hook 'slime-repl-mode-hook #'enable-paredit-mode)
+
+						(define-key slime-mode-map (kbd "(") 'paredit-open-parenthesis)
+						(define-key slime-mode-map (kbd ")") 'paredit-close-parenthesis)
+						(define-key slime-mode-map (kbd "\"") 'paredit-doublequote)
+						(define-key slime-mode-map (kbd "\\") 'paredit-backslash)
+						(define-key slime-mode-map (kbd "RET") 'paredit-newline)
+						(define-key slime-mode-map (kbd "<return>") 'paredit-newline)
+						(define-key slime-mode-map (kbd "C-j") 'newline)
+						(define-key slime-mode-map (kbd "C-h") 'backward-sexp)
+						(define-key slime-mode-map (kbd "C-t") 'transpose-sexps)
+						(define-key slime-mode-map (kbd "C-M-t") 'transpose-chars)
+						(define-key slime-mode-map (kbd "C-n") 'forward-sexp)
+						(define-key slime-mode-map (kbd "C-k") 'kill-sexp)
+						(define-key slime-mode-map (kbd "C-M-k") 'paredit-kill)
+						(define-key slime-mode-map (kbd "C-'") 'paredit-splice-sexp)
+						(define-key slime-mode-map (kbd "C-M-l") 'paredit-recentre-on-sexp)
+						(define-key slime-mode-map (kbd "C-.") 'paredit-forward-slurp-sexp)
+						(define-key slime-mode-map (kbd "C-<") 'paredit-backward-barf-sexp)
+						(define-key slime-mode-map (kbd "C->") 'paredit-forward-barf-sexp)
+						(define-key slime-mode-map (kbd "C-/") 'backward-up-list)
+						(define-key slime-mode-map (kbd "C-=") 'down-list)
+						(define-key slime-mode-map (kbd "TAB") 'slime-indent-and-complete-symbol)
+						(define-key slime-mode-map (kbd "C-c TAB") 'slime-complete-form)
+						(define-key slime-mode-map (kbd "C-c C-z") 'slime-switch-to-output-buffer)
+						(define-key slime-mode-map (kbd "C-c C-i") 'slime-inspect)
+						(define-key global-map (kbd "<f12>") 'slime-selector)
+
+						(setq slime-save-buffers nil)
+
+						(defvar slime-auto-compile-timer nil)
+
+						(defun slime-enable-auto-compile ()
+							(setf slime-auto-compile-timer
+										(run-with-idle-timer 3 t `(lambda ()
+																								(when (and slime-mode
+																													 (slime-sexp-at-point)
+																													 (slime-connected-p))
+																									(slime-compile-defun))))))
+
+						(defun slime-disable-auto-compile ()
+							(cancel-timer slime-auto-compile-timer))
+
+						(setf slime-display-edit-hilights t) ;; was nil
+
+						(defun slime-repl-clear-buffer ()
+							"Delete the entire output generated by the Lisp process."
+							(interactive)
+							;; need to add this since we narrow the region...
+							(widen)
+							(slime-eval-async `(swank:clear-repl-results))
+							(set-marker slime-repl-last-input-start-mark nil)
+							(let ((inhibit-read-only t))
+								(delete-region (point-min) (slime-repl-input-line-beginning-position))
+								(goto-char slime-repl-input-start-mark)))
+
+
+						(define-skeleton jj/cl-defpackage-skeleton
+							"Insert a Common Lisp DEFPACKAGE skeleton"
+							(skeleton-read "Package: " (if v1
+																						 (file-name-sans-extension
+																							(file-name-nondirectory
+																							 (buffer-file-name)))))
+							(if (setq v1 (bobp)) ";;; -*- Mode: Lisp; Syntax:ANSI-Common-Lisp;")
+							& (if buffer-file-coding-system
+										(concat " Coding:"
+														(symbol-name
+														 (coding-system-get buffer-file-coding-system
+																								'mime-charset))))
+							& " -*_"
+							& \n
+							& \n "(defpackage #:" str
+							\n "(:nicknames" ("Nickname: " " #:" str) & ")" | '(kill-whole-line -1)
+							\n "(:use $:CL" ((slime-read-package-name "USED package: ") " #:" str) ")"
+							"}" \n
+							\n
+							(if v1 "(in-package #:") & str & ")" & \n &
+							\n
+							_)
+
+						(add-hook 'slime-mode-hook
+											(lambda()
+												(unless (slime-connected-p)
+													(save-excursion (slime))))))
 
 (provide 'slime-conf)
 

site-lisp/tramp-conf.el

 ;;; Code:
 
 (autoload 'tramp "tramp" nil t)
+(load-after "tramp"
+						(setq tramp-default-method "ssh")
+						(setq tramp-persistency-file-name nil)
+						(setq tramp-verbose 10)
+						(setq tramp-backup-directory '((concat user-emacs-directory ".backup")))
 
-(setq tramp-default-method "ssh")
-;;(setq tramp-verbose 10)
-(setq tramp-backup-directory '((concat user-emacs-directory ".backup")))
-
-(defun jj/sudo-edit(&optional arg)
-  (interactive "p")
-  (if (or arg (not buffer-file-name))
-      (find-file (concat "/sudo:root@localhost:" (ido-read-file-name "File: ")))
-    (find-file (concat "/sudo:root@localhost:" buffer-file-name))))
+						(defun jj/sudo-edit(&optional arg)
+							(interactive "p")
+							(if (or arg (not buffer-file-name))
+									(find-file (concat "/sudo:root@localhost:" (ido-read-file-name "File: ")))
+									(find-file (concat "/sudo:root@localhost:" buffer-file-name)))))
 
 (provide 'tramp-conf)
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.