meidosan-mode

(defvar meidosan-mode-map nil)
(defvar meidosan-mode-string "めいどさん")
(defvar meidosan-mode-index 0)

(defun meidosan-insert-char ()
  (interactive)
  (insert-char (aref meidosan-mode-string meidosan-mode-index) 1)
  (setq meidosan-mode-index (1+ meidosan-mode-index))
  (if (>= meidosan-mode-index (length meidosan-mode-string))
      (setq meidosan-mode-index 0)))
	
(defun meidosan-mode ()
  (interactive)
  (kill-all-local-variables)
  (setq meidosan-mode-map (make-sparse-keymap))
  (setq meidosan-mode-index 0)
  (let (i)
    (setq i ?a)
    (while (<= i ?z)
      (define-key meidosan-mode-map (char-to-string i) 'meidosan-insert-char)
      (setq i (1+ i)))
    (setq i ?A)
    (while (<= i ?Z)
      (define-key meidosan-mode-map (char-to-string i) 'meidosan-insert-char)
      (setq i (1+ i))))
  (use-local-map meidosan-mode-map)
  (setq mode-name "meidosan")
  (setq majo-mode 'meidosan-mode))

メイドさん」という単語を見た時に思い付いたので、そういうことになってるんだけど、多分僕のニューラルネットワークは謎。