Skip to content

Instantly share code, notes, and snippets.

@authorNari
Created June 24, 2010 02:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save authorNari/450882 to your computer and use it in GitHub Desktop.
Save authorNari/450882 to your computer and use it in GitHub Desktop.
(defun buffer-file-name-copy ()
"現在開いているバッファのファイル名をkill-ringにコピーする。"
(interactive)
(let
((cusor (point))
(file-name (if (buffer-file-name)
(buffer-file-name) "")))
(progn
(insert file-name)
(kill-region cusor (point)))))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment