(defun count - ce - word (beg end) " Count Chinese and English words in marked region. " (interactive " r " ) (let * ((cn - word 0 ) (en - word 0 ) (total - word 0 ) (total - byte 0 )) (setq cn - word (count - matches " //cc " beg end) en - word (count - matches " //w+//W " beg end) total - word ( + cn - word en - word) total - byte ( + cn - word ( abs ( - beg end)))) (message ( format " 总计: %d (汉字: %d, 英文: %d) , %d 字母. " total - word cn - word en - word total - byte))))