# HG changeset patch # User Luke Hoersten # Date 1260726337 21600 # Node ID 2067d6164e07bb3454eae89ff0a8a26127865672 # Parent 109e0bd55b283a05922635b3d96ab58e38ab8549 Updated nav and yasnipped modes as well as cleaned up the pastebin script. diff -r 109e0bd55b28 -r 2067d6164e07 hoersten-pastebin-region.el --- a/hoersten-pastebin-region.el Sun Dec 13 11:10:06 2009 -0600 +++ b/hoersten-pastebin-region.el Sun Dec 13 11:45:37 2009 -0600 @@ -15,24 +15,28 @@ (defun pastebin-region (start end) "Send selected text to dpaste pastebin." (interactive "r") - (let* ((pastebin-url "http://inf/paste/") - (url-request-method "POST") - (url-request-extra-headers '(("Content-Type" . "application/x-www-form-urlencoded"))) - (url-request-data - (format "title=%s&content=%s&lexer=%s&author=%s" - (url-hexify-string (buffer-file-name)) ; title - (url-hexify-string (buffer-substring-no-properties start end)) ; content - (url-hexify-string (or (assoc-default major-mode pastebin-type-assoc) "text")) ; lexer - (url-hexify-string (user-full-name))))) ; author - (url-retrieve pastebin-url (lambda (arg) - (cond - ((equal :error (car arg)) - (signal (cdr arg))) - ((equal :redirect (car arg)) - (let ((redirected (cadr arg))) - (message redirected) - (with-temp-buffer - (insert redirected) - (clipboard-kill-ring-save (point-min) (point-max)))))))))) + (let* + ((pastebin-url "http://inf/paste/") + (url-request-method "POST") + (url-request-extra-headers '(("Content-Type" . "application/x-www-form-urlencoded"))) + (url-request-data + (format + "title=%s&content=%s&lexer=%s&author=%s" + (url-hexify-string (buffer-file-name)) ; title + (url-hexify-string (buffer-substring-no-properties start end)) ; content + (url-hexify-string (or (assoc-default major-mode pastebin-type-assoc) "text")) ; lexer + (url-hexify-string (user-full-name))))) ; author + (url-retrieve + pastebin-url + (lambda (arg) + (cond + ((equal :error (car arg)) + (signal (cdr arg))) + ((equal :redirect (car arg)) + (let ((redirected (cadr arg))) + (message redirected) + (with-temp-buffer + (insert redirected) + (clipboard-kill-ring-save (point-min) (point-max)))))))))) (provide 'hoersten-pastebin-region) diff -r 109e0bd55b28 -r 2067d6164e07 init.el --- a/init.el Sun Dec 13 11:10:06 2009 -0600 +++ b/init.el Sun Dec 13 11:45:37 2009 -0600 @@ -44,18 +44,22 @@ ;; includes (require 'hoersten-pastebin-region) ; send selected text to pastebin (require 'mercurial) ; load mercurial mode -(require 'nav) ; load nav bar (require 'hoersten-c-style) ; load c specific lisp +;; nav mode +(add-to-list 'load-path "~/.emacs.d/nav/") +(require 'nav) + ;; unicode (require 'pretty-mode) (global-pretty-mode t) (setq haskell-font-lock-symbols 'unicode) ;; snippets +(add-to-list 'load-path "~/.emacs.d/yasnippet/") (require 'yasnippet) (yas/initialize) -(yas/load-directory "~/.emacs.d/snippets/") +(yas/load-directory "~/.emacs.d/yasnippet/snippets/") ;; zencoding html (require 'zencoding-mode)