Created
July 12, 2010 13:08
-
-
Save miyamuko/472442 to your computer and use it in GitHub Desktop.
今開いている xyzzy のソースを GitHub で開く
This file contains 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
;; 今開いているソースを GitHub で開く | |
;; xyzzy 0.2.2.235 のソース | |
(defvar *github-xyzzy-src* | |
"http://github.com/southly/xyzzy.src/blob/0.2.2.235") | |
(defun show-current-source-on-github () | |
(interactive) | |
(let ((file (get-buffer-file-name)) | |
(lineno (current-line-number))) | |
(when (and file (string-matchp (format nil "^~A" (regexp-quote (si:system-root))) file)) | |
(shell-execute (format nil "~A/~A#L~D" | |
*github-xyzzy-src* | |
(subseq file (match-end 0)) | |
lineno) | |
t)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment