nix-archive-1(type directoryentry(namesharenode(type directoryentry(nameemacsnode(type directoryentry(name site-lispnode(type directoryentry(namekana-1.0.0-0.b239c3cnode(type directoryentry(namekana-autoloads.elnode(typeregularcontentsý;;; kana-autoloads.el --- automatically extracted autoloads (do not edit) -*- lexical-binding: t -*- ;; Generated by the `loaddefs-generate' function. ;; This file is part of GNU Emacs. ;;; Code: ;;; Generated autoloads from kana.el (register-definition-prefixes "kana" '("kana")) ;;; End of scraped data (provide 'kana-autoloads) ;; Local Variables: ;; version-control: never ;; no-update-autoloads: t ;; no-native-compile: t ;; coding: utf-8-emacs-unix ;; End: ;;; kana-autoloads.el ends here ))entry(namekana-autoloads.elcnode(typeregularcontents$;ELC ;;; Compiled ;;; in Emacs version 29.4 ;;; with all optimizations. (when (boundp 'comp--no-native-compile) (puthash load-file-name t comp--no-native-compile)) (byte-code "\300\301\302\"\210\303\304!\207" [register-definition-prefixes "kana" ("kana") provide kana-autoloads] 3) ))entry(name kana-pkg.elnode(typeregularcontentsT;;; Generated package description from kana.el -*- no-byte-compile: t -*- (define-package "kana" "1.0.0" "Review hiragana and katakana" '((emacs "24.4") (kanji-mode "1.0")) :authors '(("Damon Chan" . "elecming@gmail.com")) :maintainer '("Damon Chan" . "elecming@gmail.com") :keywords '("tools") :url "https://github.com/chenyanming/kana") ))entry(namekana.elnode(typeregularcontentsíK;;; kana.el --- Review hiragana and katakana -*- lexical-binding: t; -*- ;; Copyright (C) 2020 Damon Chan ;; Author: Damon Chan ;; URL: https://github.com/chenyanming/kana ;; Keywords: tools ;; Created: 23 May 2020 ;; Version: 1.0.0 ;; Package-Requires: ((emacs "24.4") (kanji-mode "1.0")) ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by ;; the Free Software Foundation, either version 3 of the License, or ;; (at your option) any later version. ;; This program is distributed in the hope that it will be useful, ;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;; GNU General Public License for more details. ;; You should have received a copy of the GNU General Public License ;; along with this program. If not, see . ;;; Commentary: ;; Learn Japanese Kana in Emacs. ;;; Code: (require 'shr) (ignore-errors (require 'kanji-mode)) (defvar kana-mode-map (let ((map (make-sparse-keymap))) (define-key map "v" #'kana-validate) (define-key map "s" #'kana-say-question) (define-key map "p" #'kana-previous) (define-key map "n" #'kana-next) (define-key map "t" #'kana-toggle-kana) (define-key map "r" #'kana-toggle-random) (define-key map "l" #'kana-loop-toggle) (define-key map "]" #'kana-loop-inc) (define-key map "[" #'kana-loop-dec) (define-key map "a" #'kana-first) (define-key map "j" #'kana-jump) (define-key map "q" #'kana-quit) (define-key map "d" #'kana-details) map) "Keymap for `kana-mode'.") (defvar kana-hiragana-table '( "ã‚" "ã„" "ã†" "ãˆ" "ãŠ" "ã‹" "ã" "ã" "ã‘" "ã“" "ãゃ" "ãã‚…" "ãょ" "ã•" "ã—" "ã™" "ã›" "ã" "ã—ゃ" "ã—ã‚…" "ã—ょ" "ãŸ" "ã¡" "ã¤" "ã¦" "ã¨" "ã¡ã‚ƒ" "ã¡ã‚…" "ã¡ã‚‡" "ãª" "ã«" "ã¬" "ã­" "ã®" "ã«ã‚ƒ" "ã«ã‚…" "ã«ã‚‡" "ã¯" "ã²" "ãµ" "ã¸" "ã»" "ã²ã‚ƒ" "ã²ã‚…" "ã²ã‚‡" "ã¾" "ã¿" "ã‚€" "ã‚" "ã‚‚" "ã¿ã‚ƒ" "ã¿ã‚…" "ã¿ã‚‡" "ã‚„" "ゆ" "よ" "ら" "ã‚Š" "ã‚‹" "ã‚Œ" "ã‚" "りゃ" "ã‚Šã‚…" "りょ" "ã‚" "ã‚’" "ã‚“" "ãŒ" "ãŽ" "ã" "ã’" "ã”" "ãŽã‚ƒ" "ãŽã‚…" "ãŽã‚‡" "ã–" "ã˜" "ãš" "ãœ" "ãž" "ã˜ã‚ƒ" "ã˜ã‚…" "ã˜ã‚‡" "ã " "ã¢" "ã¥" "ã§" "ã©" "ã¢ã‚ƒ" "ã¢ã‚…" "ã¢ã‚‡" "ã°" "ã³" "ã¶" "ã¹" "ã¼" "ã³ã‚ƒ" "ã³ã‚…" "ã³ã‚‡" "ã±" "ã´" "ã·" "ãº" "ã½" "ã´ã‚ƒ" "ã´ã‚…" "ã´ã‚‡") "Hiragana table extracted from https://en.wikipedia.org/wiki/Hiragana.") (defvar kana-hiragana-romaji-table '( "a" "i" "u" "e" "o" "ka" "ki " "ku" "ke" "ko" "kya" "kyu" "kyo" "sa" "shi" "su" "se" "so" "sha" "shu" "sho" "ta" "chi" "tsu" "te" "to" "cha" "chu" "cho" "na" "ni" "nu" "ne" "no" "nya" "nyu" "nyo" "ha" "hi" "fu" "he" "ho" "hya" "hyu" "hyo" "ma" "mi" "mu" "me" "mo" "mya" "myu" "myo" "ya" "yu" "yo" "ra" "ri" "ru" "re" "ro" "rya" "ryu" "ryo" "wa" "wo" "n" "ga" "gi" "gu" "ge" "go" "gya" "gyu" "gyo" "za" "ji" "zu" "ze" "zo" "ja" "ju" "jo" "da" "ji" "zu" "de" "do" "ja" "ju" "jo" "ba" "bi" "bu" "be" "bo" "bya" "byu" "byo" "pa" "pi" "pu" "pe" "po" "pya" "pyu" "pyo") "Hiragana romaji table extracted from https://en.wikipedia.org/wiki/Hiragana.") (defvar kana-katakana-table '( "ã‚¢" "イ" "ウ" "エ" "オ" "ã‚«" "ã‚­" "ク" "ケ" "コ" "キャ" "キュ" "キョ" "サ" "ã‚·" "ス" "ã‚»" "ソ" "シャ" "シュ" "ショ" "ã‚¿" "ãƒ" "ツ" "テ" "ト" "ãƒãƒ£" "ãƒãƒ¥" "ãƒãƒ§" "ナ" "ニ" "ヌ" "ãƒ" "ノ" "ニャ" "ニュ" "ニョ" "ãƒ" "ヒ" "フ" "ヘ" "ホ" "ヒャ" "ヒュ" "ヒョ" "マ" "ミ" "ム" "メ" "モ" "ミャ" "ミュ" "ミョ" "ヤ" "ユ" "ヨ" "ラ" "リ" "ル" "レ" "ロ" "リャ" "リュ" "リョ" "ワ" "ã‚’" "ン" "ガ" "ã‚®" "ã‚°" "ゲ" "ã‚´" "ギャ" "ギュ" "ギョ" "ザ" "ジ" "ズ" "ゼ" "ゾ" "ジャ" "ジュ" "ジョ" "ダ" "ヂ" "ヅ" "デ" "ド" "ヂャ" "ヂュ" "ヂョ" "ãƒ" "ビ" "ブ" "ベ" "ボ" "ビャ" "ビュ" "ビョ" "パ" "ピ" "プ" "ペ" "ãƒ" "ピャ" "ピュ" "ピョ") "Katakana table extracted from https://en.wikipedia.org/wiki/Katakana.") (defvar kana-katakana-romaji-table '( "a" "i" "u" "e" "o" "ka" "ki " "ku " "ke" "ko" "kya" "kyu" "kyo" "sa" "shi" "su " "se" "so" "sha" "shu" "sho" "ta" "chi" "tsu" "te" "to" "cha" "chu" "cho" "na" "ni" "nu" "ne" "no" "nya" "nyu" "nyo" "ha" "hi" "fu" "he" "ho" "hya" "hyu" "hyo" "ma" "mi" "mu" "me" "mo" "mya" "myu" "myo" "ya" "yu" "yo" "ra" "ri" "ru" "re" "ro" "rya" "ryu" "ryo" "wa" "wo" "n" "ga" "gi" "gu" "ge" "go" "gya" "gyu" "gyo" "za" "ji" "zu" "ze" "zo" "ja " "ju " "jo" "da" "ji" "zu" "de" "do" "ja " "ju " "jo" "ba" "bi" "bu" "be" "bo" "bya" "byu" "byo" "pa" "pi" "pu" "pe" "po" "pya" "pyu" "pyo") "Katakana romaji table extracted from https://en.wikipedia.org/wiki/Katakana.") (defvar kana-header-function #'kana-header) (defvar kana-toggle-kana t) (defvar kana-loop-toggle nil) (defvar kana-number 0) (defvar kana-last-number 0) (defvar kana-loop-speed 1.0) (defvar kana-details-show nil) (defcustom kana-in-sequence t "Set nil random or t in sequence when enter *kana*." :group 'kana :type 'boolean) (defface kana-question-face '((t :inherit default :height 4.0)) "Face used for question" :group 'kana-faces) (defface kana-romaji-face '((t :inherit default :height 4.0 :foreground "#A3BE8C")) "Face used for romaji" :group 'kana-faces) (defface kana-answer-face '((t :inherit default :height 4.0 :foreground "#81A1C1")) "Face used for answer" :group 'kana-faces) (defun kana-mode () "Major mode for kana. \\{kana-mode-map}" (interactive) (kill-all-local-variables) (use-local-map kana-mode-map) (setq major-mode 'kana-mode mode-name "kana-mode" truncate-lines t buffer-read-only t header-line-format '(:eval (funcall kana-header-function))) (buffer-disable-undo) (add-hook 'kill-buffer-hook '(lambda () (when kana-loop-toggle (setq kana-loop-toggle nil) (kana-loop-stop))) nil :local) (run-mode-hooks 'kana-mode-hook)) (defun kana-header () "Header function for *kana* buffer." (format "%s %s %s %s %s %s %s %s %s %s %s" (concat (propertize "t" 'face 'bold) (if kana-toggle-kana ":Hiragana" ":Katakana")) (concat (propertize "r" 'face 'bold) (if kana-in-sequence ":in sequence" ":random")) (concat (propertize "l" 'face 'bold) (if kana-loop-toggle ":loop" ":normal")) (if kana-loop-toggle (concat "(+" (number-to-string kana-loop-speed) "s) ") "") (concat (propertize "v" 'face 'bold) "alidate") (concat (propertize "s" 'face 'bold) "ay") (concat (propertize "n" 'face 'bold) "ext") (concat (propertize "p" 'face 'bold) "revious") (concat (propertize "j" 'face 'bold) "ump") (concat (propertize "d" 'face 'bold) "etails") (concat (propertize "q" 'face 'bold) "uit"))) (defun kana-toggle-kana () "Toggle hiragana or katakana." (interactive) (setq kana-toggle-kana (if kana-toggle-kana nil t)) (kana kana-number)) (defun kana-toggle-random () "Toggle kana show in random or in sequence." (interactive) (setq kana-in-sequence (if kana-in-sequence nil t)) (kana kana-number)) (defun kana-previous () "Previous kana." (interactive) (if kana-in-sequence (progn (if (> kana-number 0) (setq kana-number (1- kana-number)) (setq kana-number (1- (length kana-hiragana-table)))) (kana kana-number)) (kana kana-last-number))) (defun kana-next () "Next kana." (interactive) (if kana-in-sequence (progn (if (< kana-number (1- (length kana-hiragana-table))) (setq kana-number (1+ kana-number)) (setq kana-number 0)) (kana kana-number)) (kana))) (defun kana-first () "Go to first kana - ã‚." (interactive) (kana 0) (message "ã‚")) (defun kana (&optional index) "Start to lean kana. Optional argument INDEX is the number of kana in the list." (interactive) (switch-to-buffer (get-buffer-create "*kana*")) (setq buffer-read-only nil) (erase-buffer) (setq kana-last-number kana-number) (let* ((w (window-width)) (h (window-height)) (hsep (cond ((> w 26) " ") ((> w 20) " ") (t ""))) (vsep (cond ((> h 17) "\n\n") (t "\n"))) (indent (make-string (/ (- w 7 (* 6 (length hsep))) 2) ?\s)) (temp-table (if kana-toggle-kana kana-hiragana-table kana-katakana-table)) (number (or index (if kana-in-sequence kana-number (random (1- (length temp-table)))))) (question (nth number temp-table)) beg end) (setq kana-number number) (insert (make-string (/ (- h 7 (if (> h 12) 3 0) (* 6 (1- (length vsep)))) 2) ?\n)) (when (or (string= vsep "\n\n") (> h 12)) (insert indent) (setq beg (point)) (insert (format "%s " (propertize question 'face 'kana-question-face 'mouse-face 'mode-line-highlight 'help-echo (format "https://en.wikipedia.org/wiki/%s" question)))) (setq end (point)) (put-text-property beg end 'question question) (put-text-property beg end 'indent indent)) (let ((map (make-sparse-keymap))) (define-key map [mouse-1] 'kana-mouse-1) (define-key map [mouse-3] 'kana-mouse-3) (put-text-property beg end 'keymap map)) (goto-char (point-min)) ; cursor is always in the (point-min) (kana-say-question)) (setq buffer-read-only t) (unless (eq major-mode 'kana-mode) (kana-mode)) (when kana-details-show ;; Set to nil and function `kana-details' will set t back to make it auto ;; update and auto show when *kana* updates. (setq kana-details-show nil) (kana-details))) (defun kana-mouse-1 (event) "Browser the url click on with eww. Argument EVENT mouse event." (interactive "e") ;; (message "click mouse-3") (let ((window (posn-window (event-end event))) (pos (posn-point (event-end event)))) (if (not (windowp window)) (error "No URL chosen")) (with-current-buffer (window-buffer window) (goto-char pos) (eww-browse-url (get-text-property (point) 'help-echo))))) (defun kana-mouse-3 (event) "Browser the url click on with browser. Argument EVENT mouse event." (interactive "e") ;; (message "click mouse-3") (let ((window (posn-window (event-end event))) (pos (posn-point (event-end event)))) (if (not (windowp window)) (error "No URL chosen")) (with-current-buffer (window-buffer window) (goto-char pos) (browse-url (get-text-property (point) 'help-echo))))) (defun kana-loop-toggle () "Enter or quit Kana loop." (interactive) (if (setq kana-loop-toggle (if kana-loop-toggle nil t)) (progn (kana kana-number) (kana-loop-start)) (progn (kana kana-number) (kana-loop-stop)))) (defun kana-loop-start () "Start kana loop." (when (eq major-mode 'kana-mode) (run-with-timer 0 kana-loop-speed 'kana-validate) (kana kana-number) (message "Start kana loop"))) (defun kana-loop-stop () "Stop kana loop." (cancel-function-timers 'kana-validate) (message "Stop kana loop")) (defun kana-loop-inc () "Increse the repeat timer of kana loop." (interactive) (setq kana-loop-speed (+ kana-loop-speed 0.5)) (message (number-to-string kana-loop-speed)) (cancel-function-timers 'kana-validate) (kana-loop-start)) (defun kana-loop-dec () "Decrease the repeat timer of kana loop." (interactive) (if (> kana-loop-speed 1) (setq kana-loop-speed (- kana-loop-speed 0.5))) (message (number-to-string kana-loop-speed)) (cancel-function-timers 'kana-validate) (kana-loop-start)) (defun kana-validate () "Validate the kana." (interactive) (let* ((buffer-read-only nil) (temp-table (if kana-toggle-kana kana-hiragana-table kana-katakana-table)) (temp-table-other (if (not kana-toggle-kana) kana-hiragana-table kana-katakana-table)) (temp-romaji-table (if kana-toggle-kana kana-hiragana-romaji-table kana-katakana-romaji-table)) (question-location (text-property-not-all (point-min) (point-max) 'question nil)) (question (save-excursion (goto-char question-location) (get-text-property (point) 'question))) (indent (save-excursion (goto-char (text-property-not-all (point-min) (point-max) 'indent nil)) (get-text-property (point) 'indent))) (answer (save-excursion (goto-char (or (text-property-not-all (point-min) (point-max) 'answer nil) (point))) (get-text-property (point) 'answer))) (actual-answer (nth (-elem-index question temp-table) temp-romaji-table)) (actual-answer-other (nth (-elem-index question temp-table) temp-table-other)) beg end) (if (equal answer actual-answer) (if kana-in-sequence (kana-next) (kana)) (save-excursion (progn (goto-char question-location) (forward-line 1) (insert "\n") (insert indent) (setq beg (point)) (insert (propertize actual-answer 'face 'kana-romaji-face)) (setq end (point)) (put-text-property beg end 'answer actual-answer) (insert "\n") (insert indent) (insert (propertize actual-answer-other 'face 'kana-answer-face)) (insert "\n")))))) (defun kana-say-question () "Read the question out." (interactive) (let ((question (save-excursion (goto-char (text-property-not-all (point-min) (point-max) 'question nil)) (get-text-property (point) 'question)))) (if (eq system-type 'darwin) (call-process-shell-command (format "say -v Kyoko %s -r 100" question) nil 0) (let ((player (or (executable-find "mpv") (executable-find "mplayer") (executable-find "mpg123")))) (if player (start-process player nil player (format "http://dict.youdao.com/dictvoice?type=2&audio=%s" (url-hexify-string question))) (message "mpv, mplayer or mpg123 is needed to play word voice")))))) (defun kana-quit () "Quit kana." (interactive) (when (eq major-mode 'kana-mode) (if (get-buffer "*kana*") (kill-buffer "*kana*")) (if (get-buffer "*kana-details*") (kill-buffer "*kana-details*")))) (defun kana-jump () "Jump to kana." (interactive) (kana (if kana-toggle-kana (-elem-index (car (split-string (let* ((new (cl-mapcar '(lambda (a b c) (concat a " " b " " c)) kana-hiragana-table kana-hiragana-romaji-table kana-katakana-table)) (question (if (eq major-mode 'kana-mode) (save-excursion (goto-char (text-property-not-all (point-min) (point-max) 'question nil)) (get-text-property (point) 'question))))) (completing-read "Hiragana: " new nil nil nil nil (car (cl-member question new :test #'cl-search)))) " ")) kana-hiragana-table) (-elem-index (car (split-string (let ((new (cl-mapcar '(lambda (a b c) (concat a " " b " " c)) kana-katakana-table kana-katakana-romaji-table kana-hiragana-table)) (question (if (eq major-mode 'kana-mode) (save-excursion (goto-char (text-property-not-all (point-min) (point-max) 'question nil)) (get-text-property (point) 'question))))) (completing-read "Katakana: " new nil nil nil nil (car (cl-member question new :test #'cl-search)))) " ")) kana-katakana-table)))) (defun kana-details () "Display buffer *kana-details*. 1. Show stroke order using svg files provided by variable `kanji-mode' (if available). From https://github.com/wsgac/kanji-mode. 2. Show the help links keybindings inherits from `shr-map'." (interactive) (if (setq kana-details-show (if kana-details-show nil t)) (let* ((question-location (text-property-not-all (point-min) (point-max) 'question nil)) (char (char-after question-location)) (question (get-text-property question-location 'question)) (wiki (format "https://en.wikipedia.org/wiki/%s" question)) (jisho (format "https://jisho.org/search/%s" question)) (weblio (format "https://ejje.weblio.jp/content/%s" question)) (image (if (boundp '*kanji-svg-path*) (create-image (concat (expand-file-name (format "%05x" char) *kanji-svg-path*) ".svg")))) beg) (switch-to-buffer-other-window (get-buffer-create "*kana-details*")) (with-current-buffer "*kana-details*" (setq buffer-read-only nil) (erase-buffer) ;; stroke order (when image (insert-image image) (insert "\n")) ;; wiki (setq beg (point)) (insert wiki) (shr-urlify beg (shr-expand-url wiki)) (insert "\n") ;; jisho (setq beg (point)) (insert jisho) (shr-urlify beg (shr-expand-url jisho)) (insert "\n") ;; weblio (setq beg (point)) (insert weblio) (shr-urlify beg (shr-expand-url weblio)) (insert "\n") (setq buffer-read-only t) (goto-char (point-min))) (select-window (get-buffer-window "*kana*"))) (progn (when (select-window (get-buffer-window "*kana-details*")) (delete-window))))) (provide 'kana) ;;; kana.el ends here ))entry(namekana.elcnode(typeregularcontentsö3;ELC ;;; Compiled ;;; in Emacs version 29.4 ;;; with all optimizations. (byte-code "\300\301!\210\3021 \300\303!0\207\210\304\207" [require shr (error) kanji-mode nil] 2)#@25 Keymap for `kana-mode'. (defvar kana-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\325#\210\301\326\327#\210\301\330\331#\210\301\332\333#\210\207" [make-sparse-keymap define-key "v" kana-validate "s" kana-say-question "p" kana-previous "n" kana-next "t" kana-toggle-kana "r" kana-toggle-random "l" kana-loop-toggle "]" kana-loop-inc "[" kana-loop-dec "a" kana-first "j" kana-jump "q" kana-quit "d" kana-details] 5) (#$ . 183))#@71 Hiragana table extracted from https://en.wikipedia.org/wiki/Hiragana. (defvar kana-hiragana-table '("ã‚" "ã„" "ã†" "ãˆ" "ãŠ" "ã‹" "ã" "ã" "ã‘" "ã“" "ãゃ" "ãã‚…" "ãょ" "ã•" "ã—" "ã™" "ã›" "ã" "ã—ゃ" "ã—ã‚…" "ã—ょ" "ãŸ" "ã¡" "ã¤" "ã¦" "ã¨" "ã¡ã‚ƒ" "ã¡ã‚…" "ã¡ã‚‡" "ãª" "ã«" "ã¬" "ã­" "ã®" "ã«ã‚ƒ" "ã«ã‚…" "ã«ã‚‡" "ã¯" "ã²" "ãµ" "ã¸" "ã»" "ã²ã‚ƒ" "ã²ã‚…" "ã²ã‚‡" "ã¾" "ã¿" "ã‚€" "ã‚" "ã‚‚" "ã¿ã‚ƒ" "ã¿ã‚…" "ã¿ã‚‡" "ã‚„" "ゆ" "よ" "ら" "ã‚Š" "ã‚‹" "ã‚Œ" "ã‚" "りゃ" "ã‚Šã‚…" "りょ" "ã‚" "ã‚’" "ã‚“" "ãŒ" "ãŽ" "ã" "ã’" "ã”" "ãŽã‚ƒ" "ãŽã‚…" "ãŽã‚‡" "ã–" "ã˜" "ãš" "ãœ" "ãž" "ã˜ã‚ƒ" "ã˜ã‚…" "ã˜ã‚‡" "ã " "ã¢" "ã¥" "ã§" "ã©" "ã¢ã‚ƒ" "ã¢ã‚…" "ã¢ã‚‡" "ã°" "ã³" "ã¶" "ã¹" "ã¼" "ã³ã‚ƒ" "ã³ã‚…" "ã³ã‚‡" "ã±" "ã´" "ã·" "ãº" "ã½" "ã´ã‚ƒ" "ã´ã‚…" "ã´ã‚‡") (#$ . 771))#@78 Hiragana romaji table extracted from https://en.wikipedia.org/wiki/Hiragana. (defvar kana-hiragana-romaji-table '("a" "i" "u" "e" "o" "ka" "ki " "ku" "ke" "ko" "kya" "kyu" "kyo" "sa" "shi" "su" "se" "so" "sha" "shu" "sho" "ta" "chi" "tsu" "te" "to" "cha" "chu" "cho" "na" "ni" "nu" "ne" "no" "nya" "nyu" "nyo" "ha" "hi" "fu" "he" "ho" "hya" "hyu" "hyo" "ma" "mi" "mu" "me" "mo" "mya" "myu" "myo" "ya" "yu" "yo" "ra" "ri" "ru" "re" "ro" "rya" "ryu" "ryo" "wa" "wo" "n" "ga" "gi" "gu" "ge" "go" "gya" "gyu" "gyo" "za" "ji" "zu" "ze" "zo" "ja" "ju" "jo" "da" "ji" "zu" "de" "do" "ja" "ju" "jo" "ba" "bi" "bu" "be" "bo" "bya" "byu" "byo" "pa" "pi" "pu" "pe" "po" "pya" "pyu" "pyo") (#$ . 1639))#@71 Katakana table extracted from https://en.wikipedia.org/wiki/Katakana. (defvar kana-katakana-table '("ã‚¢" "イ" "ウ" "エ" "オ" "ã‚«" "ã‚­" "ク" "ケ" "コ" "キャ" "キュ" "キョ" "サ" "ã‚·" "ス" "ã‚»" "ソ" "シャ" "シュ" "ショ" "ã‚¿" "ãƒ" "ツ" "テ" "ト" "ãƒãƒ£" "ãƒãƒ¥" "ãƒãƒ§" "ナ" "ニ" "ヌ" "ãƒ" "ノ" "ニャ" "ニュ" "ニョ" "ãƒ" "ヒ" "フ" "ヘ" "ホ" "ヒャ" "ヒュ" "ヒョ" "マ" "ミ" "ム" "メ" "モ" "ミャ" "ミュ" "ミョ" "ヤ" "ユ" "ヨ" "ラ" "リ" "ル" "レ" "ロ" "リャ" "リュ" "リョ" "ワ" "ã‚’" "ン" "ガ" "ã‚®" "ã‚°" "ゲ" "ã‚´" "ギャ" "ギュ" "ギョ" "ザ" "ジ" "ズ" "ゼ" "ゾ" "ジャ" "ジュ" "ジョ" "ダ" "ヂ" "ヅ" "デ" "ド" "ヂャ" "ヂュ" "ヂョ" "ãƒ" "ビ" "ブ" "ベ" "ボ" "ビャ" "ビュ" "ビョ" "パ" "ピ" "プ" "ペ" "ãƒ" "ピャ" "ピュ" "ピョ") (#$ . 2335))#@78 Katakana romaji table extracted from https://en.wikipedia.org/wiki/Katakana. (defvar kana-katakana-romaji-table '("a" "i" "u" "e" "o" "ka" "ki " "ku " "ke" "ko" "kya" "kyu" "kyo" "sa" "shi" "su " "se" "so" "sha" "shu" "sho" "ta" "chi" "tsu" "te" "to" "cha" "chu" "cho" "na" "ni" "nu" "ne" "no" "nya" "nyu" "nyo" "ha" "hi" "fu" "he" "ho" "hya" "hyu" "hyo" "ma" "mi" "mu" "me" "mo" "mya" "myu" "myo" "ya" "yu" "yo" "ra" "ri" "ru" "re" "ro" "rya" "ryu" "ryo" "wa" "wo" "n" "ga" "gi" "gu" "ge" "go" "gya" "gyu" "gyo" "za" "ji" "zu" "ze" "zo" "ja " "ju " "jo" "da" "ji" "zu" "de" "do" "ja " "ju " "jo" "ba" "bi" "bu" "be" "bo" "bya" "byu" "byo" "pa" "pi" "pu" "pe" "po" "pya" "pyu" "pyo") (#$ . 3204)) (defvar kana-header-function 'kana-header) (defvar kana-toggle-kana t) (defvar kana-loop-toggle nil) (defvar kana-number 0) (defvar kana-last-number 0) (defvar kana-loop-speed 1.0) (defvar kana-details-show nil) (byte-code "\300\301\302\303\304DD\305\306\307\310\311&\207" [custom-declare-variable kana-in-sequence funcall function #[0 "\300\207" [t] 1 ""] "Set nil random or t in sequence when enter *kana*." :group kana :type boolean] 8) (custom-declare-face 'kana-question-face '((t :inherit default :height 4.0)) "Face used for question" :group 'kana-faces) (custom-declare-face 'kana-romaji-face '((t :inherit default :height 4.0 :foreground "#A3BE8C")) "Face used for romaji" :group 'kana-faces) (custom-declare-face 'kana-answer-face '((t :inherit default :height 4.0 :foreground "#81A1C1")) "Face used for answer" :group 'kana-faces)#@39 Major mode for kana. \{kana-mode-map} (defalias 'kana-mode #[0 "\306 \210\307!\210\310\311\312\211\313\314 \210\315\316\317\320\321$\210\322\323!\207" [kana-mode-map major-mode mode-name truncate-lines buffer-read-only header-line-format kill-all-local-variables use-local-map kana-mode "kana-mode" t (:eval (funcall kana-header-function)) buffer-disable-undo add-hook kill-buffer-hook (lambda nil (when kana-loop-toggle (setq kana-loop-toggle nil) (kana-loop-stop))) nil :local run-mode-hooks kana-mode-hook] 6 (#$ . 4749) nil])#@36 Header function for *kana* buffer. (defalias 'kana-header #[0 "\304\305\306\307\310\311#\203\312\202\313P\306\314\310\311# \203\315\202\316P\306\317\310\311#\n\203-\320\202.\321P\n\203<\322\323 !\324Q\202=\325\306\326\310\311#\327P\306\330\310\311#\331P\306\332\310\311#\333P\306\334\310\311#\335P\306\336\310\311#\337P\306\340\310\311#\341P\306\342\310\311#\343P&\f\207" [kana-toggle-kana kana-in-sequence kana-loop-toggle kana-loop-speed format "%s %s %s %s %s %s %s %s %s %s %s" propertize "t" face bold ":Hiragana" ":Katakana" "r" ":in sequence" ":random" "l" ":loop" ":normal" "(+" number-to-string "s) " "" "v" "alidate" "s" "ay" "n" "ext" "p" "revious" "j" "ump" "d" "etails" "q" "uit"] 16 (#$ . 5290)])#@30 Toggle hiragana or katakana. (defalias 'kana-toggle-kana #[0 "?\302 !\207" [kana-toggle-kana kana-number kana] 2 (#$ . 6027) nil])#@44 Toggle kana show in random or in sequence. (defalias 'kana-toggle-random #[0 "?\302 !\207" [kana-in-sequence kana-number kana] 2 (#$ . 6165) nil])#@16 Previous kana. (defalias 'kana-previous #[0 "\203 \304V\203 S\202\nGS\305 !\207\305 !\207" [kana-in-sequence kana-number kana-hiragana-table kana-last-number 0 kana] 2 (#$ . 6319) nil])#@12 Next kana. (defalias 'kana-next #[0 "\203 \nGSW\203 T\202\303\304 !\207\304 \207" [kana-in-sequence kana-number kana-hiragana-table 0 kana] 2 (#$ . 6519) nil])#@25 Go to first kana - ã‚. (defalias 'kana-first #[0 "\300\301!\210\302\303!\207" [kana 0 message "ã‚"] 2 (#$ . 6693) nil])#@102 Start to lean kana. Optional argument INDEX is the number of kana in the list. (fn &optional INDEX) (defalias 'kana #[256 "\306\307\310!!\210\311\312 \210 \313 \314 \315V\203\316\202&\317V\203%\320\202&\321\322V\2030\323\2021\324\325\326Z\327G_Z\330\245\331\" \203F\f\202G \206Z7\203U \202Z\332GS!\2118\311\211\325\333\n\326\f\334V\203q\335\202r\336\327\fGS_$\330\245\337\"c\210\323\230\204\215\334V\203\271c\210`\262\340\341\342\343\344\345\346\347\340\350 \"&\"c\210`\262\351\352$\210\351\353 $\210\354 \355\356\357#\210\355\360\361#\210\351\362$\266eb\210\363 \266 \3648\365=\204\342\365 \2109\205\354\3119\366 \207" [buffer-read-only kana-number kana-last-number kana-toggle-kana kana-hiragana-table kana-katakana-table switch-to-buffer get-buffer-create "*kana*" nil erase-buffer window-width window-height 26 " " 20 " " "" 17 "\n\n" "\n" make-string 7 6 2 32 random - 12 3 0 10 format "%s " propertize face kana-question-face mouse-face mode-line-highlight help-echo "https://en.wikipedia.org/wiki/%s" put-text-property question indent make-sparse-keymap define-key [mouse-1] kana-mouse-1 [mouse-3] kana-mouse-3 keymap kana-say-question t kana-mode kana-details kana-in-sequence major-mode kana-details-show] 23 (#$ . 6821) nil])#@76 Browser the url click on with eww. Argument EVENT mouse event. (fn EVENT) (defalias 'kana-mouse-1 #[257 "\300!\211@\262\301\300!!\302!\204\303\304!\210r\305!q\210\211b\210\306\307`\310\"!)\207" [event-end posn-point windowp error "No URL chosen" window-buffer eww-browse-url get-text-property help-echo] 7 (#$ . 8127) "e"])#@80 Browser the url click on with browser. Argument EVENT mouse event. (fn EVENT) (defalias 'kana-mouse-3 #[257 "\300!\211@\262\301\300!!\302!\204\303\304!\210r\305!q\210\211b\210\306\307`\310\"!)\207" [event-end posn-point windowp error "No URL chosen" window-buffer browse-url get-text-property help-echo] 7 (#$ . 8464) "e"])#@26 Enter or quit Kana loop. (defalias 'kana-loop-toggle #[0 "?\211\203\302 !\210\303 \207\302 !\210\304 \207" [kana-loop-toggle kana-number kana kana-loop-start kana-loop-stop] 2 (#$ . 8801) nil])#@18 Start kana loop. (defalias 'kana-loop-start #[0 "\303=\205\304\305 \306#\210\307\n!\210\310\311!\207" [major-mode kana-loop-speed kana-number kana-mode run-with-timer 0 kana-validate kana message "Start kana loop"] 4 (#$ . 9004)])#@17 Stop kana loop. (defalias 'kana-loop-stop #[0 "\300\301!\210\302\303!\207" [cancel-function-timers kana-validate message "Stop kana loop"] 2 (#$ . 9243)])#@40 Increse the repeat timer of kana loop. (defalias 'kana-loop-inc #[0 "\301\\\302\303!!\210\304\305!\210\306 \207" [kana-loop-speed 0.5 message number-to-string cancel-function-timers kana-validate kana-loop-start] 3 (#$ . 9403) nil])#@41 Decrease the repeat timer of kana loop. (defalias 'kana-loop-dec #[0 "\301V\203\n\302Z\303\304!!\210\305\306!\210\307 \207" [kana-loop-speed 1 0.5 message number-to-string cancel-function-timers kana-validate kana-loop-start] 3 (#$ . 9644) nil])#@20 Validate the kana. (defalias 'kana-validate #[0 "\306 \203\n\n\202 \204\n\202 \203\f\202 \307ed\310\306$\212\211b\210\311`\310\")\212\307ed\312\306$b\210\311`\312\")\212\307ed\313\306$\206E`b\210\311`\313\")\314\"8\314 \"8\306\211\232\203r\203m\315 \202\245\316 \202\245\212b\210\317y\210\320c\210c\210`\262\321\322\323#c\210`\262\324\313$\210\320c\210c\210\321\322\325#c\210\320c))\207" [buffer-read-only kana-toggle-kana kana-hiragana-table kana-katakana-table kana-hiragana-romaji-table kana-katakana-romaji-table nil text-property-not-all question get-text-property indent answer -elem-index kana-next kana 1 "\n" propertize face kana-romaji-face put-text-property kana-answer-face kana-in-sequence] 16 (#$ . 9900) nil])#@24 Read the question out. (defalias 'kana-say-question #[0 "\212\301ed\302\303$b\210\304`\302\")\305=\203\306\307\310\"\303\311#\207\312\313!\206,\312\314!\206,\312\315!\211\203=\316\303\307\317\320!\"$\207\321\322!\207" [system-type text-property-not-all question nil get-text-property darwin call-process-shell-command format "say -v Kyoko %s -r 100" 0 executable-find "mpv" "mplayer" "mpg123" start-process "http://dict.youdao.com/dictvoice?type=2&audio=%s" url-hexify-string message "mpv, mplayer or mpg123 is needed to play word voice"] 10 (#$ . 10673) nil])#@12 Quit kana. (defalias 'kana-quit #[0 "\301=\205\302\303!\203\304\303!\210\302\305!\205\304\305!\207" [major-mode kana-mode get-buffer "*kana*" kill-buffer "*kana-details*"] 2 (#$ . 11250) nil])#@15 Jump to kana. (defalias 'kana-jump #[0 "\306\203=\307\310\311\312 \n $\f\313=\205!\212\314ed\315\316$b\210\317`\315\")\320\321\316\211\211\211\322\n\323\324$@&\266\202\325\"@ \"\202r\307\310\311\326 $\f\313=\205Y\212\314ed\315\316$b\210\317`\315\")\320\327\316\211\211\211\322\n\323\324$@&\266\202\325\"@ \"!\207" [kana-toggle-kana kana-hiragana-table kana-hiragana-romaji-table kana-katakana-table major-mode kana-katakana-romaji-table kana -elem-index split-string cl-mapcar (lambda (a b c) (concat a " " b " " c)) kana-mode text-property-not-all question nil get-text-property completing-read "Hiragana: " cl-member :test cl-search " " (lambda (a b c) (concat a " " b " " c)) "Katakana: "] 17 (#$ . 11455) nil])#@221 Display buffer *kana-details*. 1. Show stroke order using svg files provided by variable `kanji-mode' (if available). From https://github.com/wsgac/kanji-mode. 2. Show the help links keybindings inherits from `shr-map'. (defalias 'kana-details #[0 "?\211\203\212\303ed\304\305$\211f\306\304\"\307\310\"\307\311\"\307\312\"\313\301!\2051\314\315\307\316\" \"\317P!\305\320\321\322!!\210r\322q\210\305\323 \210\203L\324!\210\325c\210`\262c\210\326\327!\"\210\325c\210`\262c\210\326\327!\"\210\325c\210`\262c\210\326\327!\"\210\325c\210\330eb)\210\331\332\333!!\207\331\332\322!!\205\224\334 \207" [kana-details-show *kanji-svg-path* buffer-read-only text-property-not-all question nil get-text-property format "https://en.wikipedia.org/wiki/%s" "https://jisho.org/search/%s" "https://ejje.weblio.jp/content/%s" boundp create-image expand-file-name "%05x" ".svg" switch-to-buffer-other-window get-buffer-create "*kana-details*" erase-buffer insert-image "\n" shr-urlify shr-expand-url t select-window get-buffer-window "*kana*" delete-window] 12 (#$ . 12193) nil]) (provide 'kana) )))))))))))