Skip to content

Instantly share code, notes, and snippets.

@miyamuko
Created July 12, 2010 13:08
Show Gist options
  • Save miyamuko/472442 to your computer and use it in GitHub Desktop.
Save miyamuko/472442 to your computer and use it in GitHub Desktop.
今開いている xyzzy のソースを GitHub で開く
;; 今開いているソースを 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