Skip to content

Instantly share code, notes, and snippets.

@FromAtom
FromAtom / init-tex.el
Last active February 6, 2019 05:14
YaTeXでTeXを書いている状態で保存時に動作する。 "、"と"。"を","と"." に変換し、全角英数字を半角英数字に変換する。
;;バッファ全体の句読点と読点をコンマとピリオドに変換
(defun replace-commaperiod-buffer ()
(interactive "r")
(save-excursion
(replace-string "、" "," nil (point-min) (point-max))
(replace-string "。" "." nil (point-min) (point-max))))
;;選択範囲内の全角英数字を半角英数字に変換
(defun hankaku-eisuu-region (start end)
(interactive "r")