Created
August 19, 2012 01:40
-
-
Save mbriggs/3390849 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| (require 'webjump) | |
| ; hax - I want webjump to default to word-at-point if there is a word-at-point | |
| (defun webjump-read-string (prompt) | |
| (let* ((prompt (concat prompt (if (word-at-point) (concat " (default: " (word-at-point) ")")) ": ")) | |
| (input (read-string prompt))) | |
| (if (webjump-null-or-blank-string-p input) (word-at-point) input))) | |
| (setq webjump-sites | |
| '(("Hacker News" . "http://news.ycombinator.com") | |
| ("Twitter" . "http://www.twitter.com") | |
| ("Underscore" . "http://underscorejs.org/") | |
| ("Backbone" . "http://backbonejs.org") | |
| ("MDN" . | |
| [simple-query "https://developer.mozilla.org" | |
| "https://developer.mozilla.org/en-US/search?q=" ""]) | |
| ("jQuery" . | |
| [simple-query "http://docs.jquery.com" | |
| "http://docs.jquery.com/Special:Search?ns0=1&search=" ""]) | |
| ("Google" . | |
| [simple-query "https://www.google.com/" | |
| "https://www.google.com/search?q=" ""]) | |
| ("APIDock - Ruby" . | |
| [simple-query "http://apidock.com" | |
| "http://apidock.com/ruby/search?query=" ""]) | |
| ("APIDock - Rails" . | |
| [simple-query "http://apidock.com" | |
| "http://apidock.com/rails/search?query=" ""]))) | |
| (provide 'webjump) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment