Skip to content

Instantly share code, notes, and snippets.

@southly
Forked from miyamuko/gist:472442
Created August 31, 2010 19:09
Show Gist options
  • Save southly/559544 to your computer and use it in GitHub Desktop.
Save southly/559544 to your computer and use it in GitHub Desktop.
#xyzzy
;; 今開いているソースを GitHub で開く
;; xyzzy 0.2.2.235 のソース
(defvar *github-xyzzy-src*
"http://github.com/southly/xyzzy.src/blob/0.2.2.235")
(defvar *local-xyzzy-src*
"X:/src/xyzzy/")
(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 *local-xyzzy-src*)) 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