Emacs part 22at UNIX
Emacs part 22 - 暇つぶし2ch452:名無しさん@お腹いっぱい。
07/08/16 05:52:49
(defun copy-filename-as-kill ()
"Copy BUFFER's full pathname into the kill ring.
If prefix arg is 0, copy the directory part.
If prefix arg is other than nil and 0, copy the basename."
(interactive)
(let ((s
(if (= 0 (prefix-numeric-value current-prefix-arg))
default-directory
(if (buffer-file-name)
(if (null current-prefix-arg)
(buffer-file-name)
(file-name-nondirectory (buffer-file-name)))
""))))
(kill-new s)))



次ページ
最新レス表示
レスジャンプ
類似スレ一覧
スレッドの検索
話題のニュース
おまかせリスト
オプション
しおりを挟む
スレッドに書込
スレッドの一覧
暇つぶし2ch