;;
;; $Id: replace-zen-to-ascii-region.el,v 1.2 2003/09/19 14:15:53 yamauchi Exp $
;; Copyright (C) 2000-2003 YAMAUCHI Hitoshi 山内 斉
;;
;; Original name is replaceNum 1999-5-9
;;
(defun replace-zen-to-ascii-region (b e)
  "Replace Zenkaku (what we called) numbers to ASCII characters"
  ;; "いわゆる全角英数字を replace-string で ascii 数字に変換する"
  (interactive "r")
  (save-excursion
    (save-restriction
      (narrow-to-region b e)
      (let ((num-list (list '("１" "1")	; なぜか最初の要素だけ失敗する
		       '("１" "1") '("２" "2") '("３" "3") '("４" "4") 
		       '("５" "5") '("６" "6") '("７" "7") '("８" "8")
		       '("９" "9") '("０" "0") '("（" "(") '("）" ")")
		       '("，" "、") '("．" "。") '("“" "``") '("”" "''")
		       '("　" " ") 
		       '("《" "<<") '("》" ">>") '("＜" "<") '("＞" ">") 
		       '("［" "[") '("］" "]") '("｛" "{") '("｝" "}")
		       '("／" "/") '("＼" "\\") '("＋" "+") '("＝" "=")
		       '("−" "-") '("‐" "-")
		       )))
	(while num-list
	  (let ((org (car (car num-list)))
		(dst (car (cdr (car num-list)))))
	    (goto-char b)
	    (replace-string org dst)
	    (setq num-list (cdr num-list))))))))
