平衡点
2019/04/01
_ 元号が「令和」との事で.
ddskk 使いとしては, 例えば
(setq skk-gengo-alist
'((reiwa "令和" "R")
(heisei "平成" "H")
(showa "昭和" "S")
(taisho "大正" "T")
(meiji "明治" "M")))
(defun my:skk-ad-to-gengo-1 (ad &optional not-gannen)
;; Add "reiwa"
(when (>= 1866 ad)
(skk-error "分りません" "Unknown year"))
(cons (cond ((>= 1911 ad)
(setq ad (- ad 1867))
(cdr (assq 'meiji skk-gengo-alist)))
((>= 1925 ad)
(setq ad (- ad 1911))
(cdr (assq 'taisho skk-gengo-alist)))
((>= 1988 ad)
(setq ad (- ad 1925))
(cdr (assq 'showa skk-gengo-alist)))
((>= 2018 ad)
(setq ad (- ad 1988))
(cdr (assq 'heisei skk-gengo-alist)))
(t
(setq ad (- ad 2018))
(cdr (assq 'reiwa skk-gengo-alist))))
(cond (not-gannen ad)
((= ad 1) "元")
(t ad))))
(advice-add 'skk-ad-to-gengo-1 :override 'my:skk-ad-to-gengo-1)
…こんな塩梅だろうか, とか?(雑)