added prelude-google defun
This commit is contained in:
parent
7c430da6b4
commit
63c7442dce
1 changed files with 11 additions and 1 deletions
|
@ -50,7 +50,7 @@ Emacs load path."
|
||||||
(prelude-add-subfolders-to-load-path vendor-dir)
|
(prelude-add-subfolders-to-load-path vendor-dir)
|
||||||
|
|
||||||
(defun prelude-open-with ()
|
(defun prelude-open-with ()
|
||||||
"Simple function that allows us to open the underlying
|
"Simple function that allows us to open the underlying
|
||||||
file of a buffer in an external program."
|
file of a buffer in an external program."
|
||||||
(interactive)
|
(interactive)
|
||||||
(when buffer-file-name
|
(when buffer-file-name
|
||||||
|
@ -68,6 +68,16 @@ file of a buffer in an external program."
|
||||||
(ansi-term "/bin/zsh")
|
(ansi-term "/bin/zsh")
|
||||||
(switch-to-buffer "*ansi-term*")))
|
(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)
|
(defun prelude-indent-rigidly-and-copy-to-clipboard (begin end indent)
|
||||||
"Copy the selected code region to the clipboard, indented according
|
"Copy the selected code region to the clipboard, indented according
|
||||||
to Markdown blockquote rules."
|
to Markdown blockquote rules."
|
||||||
|
|
Loading…
Reference in a new issue