85 (setq header-line-format (if headword (gadict-espeak-headline-line headword) nil)) |
85 (setq header-line-format (if headword (gadict-espeak-headline-line headword) nil)) |
86 (force-mode-line-update))))) |
86 (force-mode-line-update))))) |
87 |
87 |
88 (defvar gadict-espeak-headline-timer nil) |
88 (defvar gadict-espeak-headline-timer nil) |
89 (defun gadict-espeak-headline-enable () |
89 (defun gadict-espeak-headline-enable () |
|
90 "Enable headline with espeak IPA pronunciation." |
|
91 (interactive) |
90 (unless gadict-espeak-headline-timer |
92 (unless gadict-espeak-headline-timer |
91 (setq gadict-espeak-headline-timer (run-with-idle-timer 1 t #'gadict-espeak-headline-display)))) |
93 (setq gadict-espeak-headline-timer (run-with-idle-timer 1 t #'gadict-espeak-headline-display)))) |
92 (defun gadict-espeak-headline-disable () |
94 (defun gadict-espeak-headline-disable () |
|
95 "Enable headline with espeak IPA pronunciation." |
|
96 (interactive) |
93 (when gadict-espeak-headline-timer |
97 (when gadict-espeak-headline-timer |
94 (cancel-timer gadict-espeak-headline-timer)) |
98 (cancel-timer gadict-espeak-headline-timer)) |
95 (setq gadict-espeak-headline-timer nil)) |
99 (setq gadict-espeak-headline-timer nil) |
|
100 (setq header-line-format nil)) |
96 |
101 |
97 |
102 |
98 |
103 |
99 (defconst gadict--pos '("n" "v" "adj" "adv" "pron" "det" "prep" "num" "conj" "int" "phr" "phr.v" "contr" "abbr" "prefix") |
104 (defconst gadict--pos '("n" "v" "adj" "adv" "pron" "det" "prep" "num" "conj" "int" "phr" "phr.v" "contr" "abbr" "prefix") |
100 "Defined parts of speech.") |
105 "Defined parts of speech.") |