UNIX厨房の扱いについて
at UNIX
55:名無しさん@お腹いっぱい。
08/02/09 15:25:30
(defun replace-white-space-to-2ch-board-format (begin end)
(interactive
(let ()
(list
(if (and transient-mark-mode mark-active)
(region-beginning))
(if (and transient-mark-mode mark-active)
(region-end)))))
(let ((temp (buffer-substring begin end))
(buffer (get-buffer-create
"*replace-white-space-to-2ch-board-format*")))
(with-current-buffer buffer
(erase-buffer)
(insert temp)
(untabify (point-min) (point-max))
(call-process-region (point-min) (point-max) shell-file-name t buffer nil
shell-command-switch "perl -pe 's/^\\s*/q{ } x length($&)/e'")
(kill-ring-save (point-min) (point-max))
(kill-buffer buffer))))
test
次ページ最新レス表示スレッドの検索類似スレ一覧話題のニュースおまかせリスト▼オプションを表示暇つぶし2ch
5330日前に更新/19 KB
担当:undef