2011-02-12から1日間の記事一覧

elispでword count

就活のエントリーシートでwordcountが必要なときってよくある。 でもemacsのワードカウントコマンドってあるのかよく分からんかったので自分で作ってみた。 (defun wc (text) "word count" (length (apply 'concat (split-string text "[\s\n ]+")))) (defun…