added prelude-google defun

This commit is contained in:
Bozhidar Batsov 2011-10-10 17:29:52 +03:00
parent 7c430da6b4
commit 63c7442dce

View file

@ -68,6 +68,16 @@ file of a buffer in an external program."
(ansi-term "/bin/zsh")
(switch-to-buffer "*ansi-term*")))
(defun prelude-google ()
"Googles a query or region if any."
(interactive)
(browse-url
(concat
"http://www.google.com/search?ie=utf-8&oe=utf-8&q="
(if mark-active
(buffer-substring (region-beginning) (region-end))
(read-string "Google: ")))))
(defun prelude-indent-rigidly-and-copy-to-clipboard (begin end indent)
"Copy the selected code region to the clipboard, indented according
to Markdown blockquote rules."